diff --git a/client_software/0010_kwallet/install.sh b/client_software/0010_kwallet/install.sh index d99ad6a..683f850 100755 --- a/client_software/0010_kwallet/install.sh +++ b/client_software/0010_kwallet/install.sh @@ -103,7 +103,14 @@ rm -f ${WALLETPATH_CFG}/*.* #Restore initial configuration with defaults and make a backup of the old one #Only do this once! +if [[ ! -f "$SUDO_HOME/.config/kwalletrc" ]]; then + #New install, never create rc file before -> use predefined + cp -f $(dirname "0")/kwalletrc $SUDO_HOME/.config/ + chown $SUDO_USER:$SUDO_USER $SUDO_HOME/.config/kwalletrc + chmod u=rw,og-rwx $SUDO_HOME/.config/kwalletrc +fi if [[ ! -f "$SUDO_HOME/.config/kwalletrc.bak" ]]; then + # If something else was installed before and no bak is existent, make a bakup and reinstall (could also be the predefined version) cp $SUDO_HOME/.config/kwalletrc $SUDO_HOME/.config/kwalletrc.bak cp -f $(dirname "0")/kwalletrc $SUDO_HOME/.config/ chown $SUDO_USER:$SUDO_USER $SUDO_HOME/.config/kwalletrc diff --git a/client_software/0110_nextcloud_talk_app/install.sh b/client_software/0110_nextcloud_talk_app/install.sh index 4b46e36..f0127b8 100755 --- a/client_software/0110_nextcloud_talk_app/install.sh +++ b/client_software/0110_nextcloud_talk_app/install.sh @@ -11,6 +11,16 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +TALK_PID=$( pgrep -u $SUDO_USER "Nextcloud Talk" | head -n 1 ) +if [[ ! -z ${TALK_PID} ]]; then + echo "Stopping Nextcloud Talk with PID ${TALK_PID}" + kill ${TALK_PID} && sleep 0.5 + if [[ $? -ne 0 ]]; then + echo "Service could not be stopped, please check why." + exit 1 + fi +fi + FILENAME="Nextcloud.Talk-linux-x64.flatpak" SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" if [ ${SCRIPTPATH::2} == "//" ]; then diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index 6382986..145037b 100755 --- a/client_software/0110_nextcloud_talk_app/user_run.sh +++ b/client_software/0110_nextcloud_talk_app/user_run.sh @@ -8,5 +8,6 @@ fi # Start Nextcloud Talk in Background #Current Version of Talk is dumping Core echo "Starting Nextcloud Talk in Background." -/usr/bin/setsid /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background >${TEMPDIR}/talk.log 2>&1 & -sleep 5 +/usr/bin/setsid -f /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background >${TEMPDIR}/talk.log 2>&1 + +exit 0 diff --git a/client_software/user_run.sh b/client_software/user_run.sh index 6228f0a..bfc7275 100755 --- a/client_software/user_run.sh +++ b/client_software/user_run.sh @@ -40,3 +40,5 @@ done echo "Completed user scripts in software." cd ${SCRIPTPATH} +exit 0 + diff --git a/system_setup/logon_script.sh b/system_setup/logon_script.sh index 97c2b1a..3dad6b2 100755 --- a/system_setup/logon_script.sh +++ b/system_setup/logon_script.sh @@ -53,6 +53,9 @@ elog_add "Successfully obtained Token for User ${DAVTOKEN_USER}" elog_add "" elog_add "Update and install client software" +#Set global to enable git +git config --global --add safe.directory /opt/sys_config + # First, check the sudo rule elog_add "Check the matching client rule:" #Somewhat strange "sudo -l" will *sometimes* ask for password instead of just checking if the rule can be found, so it needs -n to be silent diff --git a/system_setup/sync_client_software.sh b/system_setup/sync_client_software.sh index 8f28c13..968bc2f 100755 --- a/system_setup/sync_client_software.sh +++ b/system_setup/sync_client_software.sh @@ -30,7 +30,6 @@ chmod ug+rwX,o=rX -R ${SYSCONFIGPATH} #Do an upgrade of the Base package if its configured and if there are changes if [[ ! -z "${UPGRADEURL}" ]]; then - echo "====================" echo "Checking for Upgrades on ${UPGRADEURL} and Branch ${UPGRADEBRANCH}" REMOTEURL=$( git config --get remote.origin.url ) echo "Remote git URL is ${REMOTEURL}" @@ -55,13 +54,11 @@ fi # At first, sync central configs if they are configured to be synced if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then - echo "====================" echo "Synced config path was found, doing remote sync." SYNCCMD="sudo -i /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloudcmd com.nextcloud.desktopclient.nextcloud -h -u ${DAVTOKEN_USER} -p ${DAVTOKEN_PASS} --path ${DISTCONFIGPATH_SRC} ${DISTCONFIGPATH} https://${SERVERFQDN_NC}" SYNCCMD_HIDDENPW=$( echo "${SYNCCMD/${DAVTOKEN_PASS}/***HIDDEN***}" ) echo "Exec: ${SYNCCMD_HIDDENPW}" echo "Sync Configuration" - echo "" ${SYNCCMD} >${TEMPDIR}/synccmd_last.log 2>&1 if [[ $? -ne 0 ]]; then echo "Error in sync:" @@ -77,7 +74,6 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then echo "" fi #Check if Repository is defined -echo "====================" if [ "${CLIENT_SOFTWARE_DST}." == "." ]; then echo "No central softwarerepository defined (CLIENT_SOFTWARE_DST). Skipping sync." else @@ -90,8 +86,6 @@ else SYNCCMD_HIDDENPW=$( echo "${SYNCCMD/${DAVTOKEN_PASS}/***HIDDEN***}" ) echo "Exec: ${SYNCCMD_HIDDENPW}" echo "Sync Client Software" - echo "====================" - echo "" ${SYNCCMD} >${TEMPDIR}/synccmd_last.log 2>&1 if [[ $? -ne 0 ]]; then echo "Error in sync:" @@ -121,5 +115,6 @@ else exit 1 fi fi - echo "" fi +echo "" +exit 0