From 3b392c78628b7352cc8a1fa0e703b575b585f3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20unbrot=20P=C3=A4tzold?= Date: Mon, 4 May 2026 15:21:48 +0200 Subject: [PATCH] nextcloud/user_run: block new setups when any folder is already configured Set _nc_first=0 in the already-found branch so that a configured folder prevents subsequent entries from wiping the Nextcloud config. Co-Authored-By: Claude Sonnet 4.6 --- client_software/0050_nextcloud_desktopclient/user_run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/client_software/0050_nextcloud_desktopclient/user_run.sh b/client_software/0050_nextcloud_desktopclient/user_run.sh index 27274e4..61f886e 100755 --- a/client_software/0050_nextcloud_desktopclient/user_run.sh +++ b/client_software/0050_nextcloud_desktopclient/user_run.sh @@ -92,6 +92,7 @@ for CLIENT_DATA_DECLARE_LINE in "${CLIENT_DATA_SYNC[@]}"; do # Now, CLIENT_DATA_SYNC_LINE[0] contains the local path and CLIENT_DATA_SYNC_LINE[1] contains the remote path if grep -q "localPath=${CLIENT_DATA_SYNC_LINE[0]}" "/${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/nextcloud.cfg"; then echo "Already found configured local folder ${CLIENT_DATA_SYNC_LINE[0]} syncing with ${CLIENT_DATA_SYNC_LINE[1]} . Leaving it unchanged." + _nc_first=0 else echo "Setup new sync from remote ${CLIENT_DATA_SYNC_LINE[1]} to local ${CLIENT_DATA_SYNC_LINE[0]}" if [ "${_nc_first}" -eq 0 ]; then