Files
fedora-OEMDRV/system_setup/logon_script.sh
T
Daniel Pätzold f48c656997 First Commit
2026-01-02 11:24:52 +01:00

54 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# SPDX-FileCopyrightText: Daniel Pätzold
# SPDX-License-Identifier: AGPL-3.0-or-later
#
source ./setup_system.conf
source ./setup_system.inc
echo "User Logon Script"
echo "=================="
echo ""
#Check and copy Autostart-Entry
#TODO: Check if Desktop is KDE/Plasma and support other Displays
if [ ! -f "${HOME}/.config/autostart/Logon_Script.desktop" ]; then
cp "${SCRIPTPATH}/Logon_Script.desktop" "${HOME}/.config/autostart"
fi
# Mount the private Directory
if [ ${IPAVAULTUSE} == "true" ]; then
./mount_ecrypt_home.sh
else
./mount_nocrypt_home.sh
fi
if [ $? -ne 0 ]; then
echo "Some Error when mounting private Directory, cannot continue. Your Data will not be available."
echo "If you want to redo this script here, execute ${SCRIPTPATH}/${SCRIPTNAME}"
read -n 1 -s -r -p "Press any key to continue"
exit 1
fi
#Get WEBDAV TOKEN from Nextcloud
get_nc_token
echo "Successfully obtained Token for User "${DAVTOKEN_USER}
#SYNC Firefox + Thunderbird Profile
./mozilla_starter.sh firefox sync && ./mozilla_starter.sh thunderbird sync
#Install additional Software
./sync_client_software.sh
if [ -f "${CLIENT_SOFTWARE_DST}/install.sh" ]; then
/bin/sh "${CLIENT_SOFTWARE_DST}/install.sh"
fi
#Last, remove unused Flatpak- Runtimes and unused Data
echo "Removing unused Flatpak- Data."
flatpak uninstall --unused -y
flatpak uninstall --delete-data -y
echo "Sucessfully run logon script (Wait 5 seconds)"
sleep 5
#read -n 1 -s -r -p "Press any key to continue"
#echo ""
exit 0