From ca6420f1238e0713657b3dc4cad06c9f6b75ed1e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 13 Jun 2017 22:19:54 +0100 Subject: [PATCH] Check for syncthing id files in user directories --- src/freedombone-syncthing | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/freedombone-syncthing b/src/freedombone-syncthing index b91b53ea..205584a7 100755 --- a/src/freedombone-syncthing +++ b/src/freedombone-syncthing @@ -264,6 +264,14 @@ function user_devices_changed { return fi + for d in /home/*/ ; do + USERNAME=$(echo "$d" | awk -F '/' '{print $3}') + if [ ! -f /home/$USERNAME/.syncthing-server-id ]; then + CHANGED=1 + return + fi + done + for d in /home/*/ ; do USERNAME=$(echo "$d" | awk -F '/' '{print $3}') if [[ $(is_valid_user "$USERNAME") == "1" ]]; then