Check for syncthing id files in user directories

This commit is contained in:
Bob Mottram 2017-06-13 22:19:54 +01:00
parent b5a32cf391
commit ca6420f123
1 changed files with 8 additions and 0 deletions

View File

@ -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