Ver código fonte

Removing syncthing users from the config

Bob Mottram 9 anos atrás
pai
commit
8ea00a278e
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6
    0
      src/freedombone-syncthing

+ 6
- 0
src/freedombone-syncthing Ver arquivo

57
 CHANGED=
57
 CHANGED=
58
 TEMP_IDS_FILE=/root/.synthingids
58
 TEMP_IDS_FILE=/root/.synthingids
59
 
59
 
60
+function remove_user_syncthing {
61
+    remove_username="$1"
62
+
63
+    sed -i "/<folder id=\"${remove_username}\" /,/</folder>/d" $SYNCTHING_CONFIG_FILE
64
+}
65
+
60
 function new_syncthing_id {
66
 function new_syncthing_id {
61
     for i in {1..8}
67
     for i in {1..8}
62
     do
68
     do