From a9fc6fda72b0a837c6babe1147c1ffe730143dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 13:28:19 +0200 Subject: [PATCH 01/11] Wallet: New install wrote new rc at the second logon --- client_software/0010_kwallet/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 From 0f59f60e7c514e13a2d7bcd793fe121e1edb453c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 13:45:00 +0200 Subject: [PATCH 02/11] Make install dir a git safe directory --- system_setup/logon_script.sh | 3 +++ 1 file changed, 3 insertions(+) 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 From 398354028abd793349ce418a6725c12e84554297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 13:47:07 +0200 Subject: [PATCH 03/11] Talk: call fixed in Background --- client_software/0110_nextcloud_talk_app/user_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index 6382986..6cce483 100755 --- a/client_software/0110_nextcloud_talk_app/user_run.sh +++ b/client_software/0110_nextcloud_talk_app/user_run.sh @@ -8,5 +8,5 @@ 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 & +/usr/bin/setsid -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk >${TEMPDIR}/talk.log 2>&1" sleep 5 From c5e4cc1d128a31228f85fe71a7b90ac58c253da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 13:52:46 +0200 Subject: [PATCH 04/11] talk: always fork new process --- client_software/0110_nextcloud_talk_app/user_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index 6cce483..8dc03dc 100755 --- a/client_software/0110_nextcloud_talk_app/user_run.sh +++ b/client_software/0110_nextcloud_talk_app/user_run.sh @@ -8,5 +8,5 @@ fi # Start Nextcloud Talk in Background #Current Version of Talk is dumping Core echo "Starting Nextcloud Talk in Background." -/usr/bin/setsid -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk >${TEMPDIR}/talk.log 2>&1" +/usr/bin/setsid -f -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk >${TEMPDIR}/talk.log 2>&1" sleep 5 From 4947599bb31ad629c538a458377b8a2de3422ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:09:49 +0200 Subject: [PATCH 05/11] Talk: Stop before upgrade --- client_software/0110_nextcloud_talk_app/install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 From 7e33a96231bcad2a76f14bc52c7aafd993e0f054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:10:14 +0200 Subject: [PATCH 06/11] Tidy output sync_client_software.sh --- system_setup/sync_client_software.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/system_setup/sync_client_software.sh b/system_setup/sync_client_software.sh index 8f28c13..cb42591 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,5 @@ else exit 1 fi fi - echo "" fi +echo "" From 7ef83c58461d9ed357a3d5942856b5f68127148b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:27:46 +0200 Subject: [PATCH 07/11] Talk: Fork in Background with bash --- client_software/0110_nextcloud_talk_app/user_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index 8dc03dc..a8699bf 100755 --- a/client_software/0110_nextcloud_talk_app/user_run.sh +++ b/client_software/0110_nextcloud_talk_app/user_run.sh @@ -8,5 +8,5 @@ fi # Start Nextcloud Talk in Background #Current Version of Talk is dumping Core echo "Starting Nextcloud Talk in Background." -/usr/bin/setsid -f -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk >${TEMPDIR}/talk.log 2>&1" +/usr/bin/setsid bash -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk >${TEMPDIR}/talk.log 2>&1" sleep 5 From 72faa4d0f2dc091fb2257ba435f77139e308bc69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:31:42 +0200 Subject: [PATCH 08/11] Talk: Add Background back again --- client_software/0110_nextcloud_talk_app/user_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index a8699bf..d72511e 100755 --- a/client_software/0110_nextcloud_talk_app/user_run.sh +++ b/client_software/0110_nextcloud_talk_app/user_run.sh @@ -8,5 +8,5 @@ fi # Start Nextcloud Talk in Background #Current Version of Talk is dumping Core echo "Starting Nextcloud Talk in Background." -/usr/bin/setsid bash -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk >${TEMPDIR}/talk.log 2>&1" +/usr/bin/setsid -f bash -c "/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 From 52aafd34dd702d1ed37047b35d591afb374a5a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:34:31 +0200 Subject: [PATCH 09/11] Added exit code 0 to scripts --- client_software/user_run.sh | 2 ++ system_setup/sync_client_software.sh | 1 + 2 files changed, 3 insertions(+) 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/sync_client_software.sh b/system_setup/sync_client_software.sh index cb42591..968bc2f 100755 --- a/system_setup/sync_client_software.sh +++ b/system_setup/sync_client_software.sh @@ -117,3 +117,4 @@ else fi fi echo "" +exit 0 From 7b6f7c8ea8b7ecb1b87504b61b01172dc219877b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:38:27 +0200 Subject: [PATCH 10/11] Talk: Set exitcode --- client_software/0110_nextcloud_talk_app/user_run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index d72511e..2fc9f6d 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 -f bash -c "/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 bash -c "/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 From 7514b7cbe3f0e48d32eb2182987fc237a18e1876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Sat, 25 Apr 2026 14:48:09 +0200 Subject: [PATCH 11/11] Talk: setsid won't work with Quotes --- client_software/0110_nextcloud_talk_app/user_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_software/0110_nextcloud_talk_app/user_run.sh b/client_software/0110_nextcloud_talk_app/user_run.sh index 2fc9f6d..145037b 100755 --- a/client_software/0110_nextcloud_talk_app/user_run.sh +++ b/client_software/0110_nextcloud_talk_app/user_run.sh @@ -8,6 +8,6 @@ fi # Start Nextcloud Talk in Background #Current Version of Talk is dumping Core echo "Starting Nextcloud Talk in Background." -/usr/bin/setsid -f bash -c "/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background >${TEMPDIR}/talk.log 2>&1" & +/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