Sfoglia il codice sorgente

Check for syncthing id files in user directories

Bob Mottram 8 anni fa
parent
commit
ca6420f123
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8
    0
      src/freedombone-syncthing

+ 8
- 0
src/freedombone-syncthing Vedi File

266
 
266
 
267
     for d in /home/*/ ; do
267
     for d in /home/*/ ; do
268
         USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
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
         if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
277
         if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
270
             if [ -f /home/$USERNAME/$SYNCTHING_UPDATE_FILE ]; then
278
             if [ -f /home/$USERNAME/$SYNCTHING_UPDATE_FILE ]; then
271
                 CHANGED=1
279
                 CHANGED=1