Browse Source

Check for syncthing id files in user directories

Bob Mottram 8 years ago
parent
commit
ca6420f123
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/freedombone-syncthing

+ 8
- 0
src/freedombone-syncthing View File

@@ -266,6 +266,14 @@ function user_devices_changed {
266 266
 
267 267
     for d in /home/*/ ; do
268 268
         USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
269
+        if [ ! -f /home/$USERNAME/.syncthing-server-id ]; then
270
+            CHANGED=1
271
+            return
272
+        fi
273
+    done
274
+
275
+    for d in /home/*/ ; do
276
+        USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
269 277
         if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
270 278
             if [ -f /home/$USERNAME/$SYNCTHING_UPDATE_FILE ]; then
271 279
                 CHANGED=1