浏览代码

Removing syncthing users from the config

Bob Mottram 8 年前
父节点
当前提交
8ea00a278e
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      src/freedombone-syncthing

+ 6
- 0
src/freedombone-syncthing 查看文件

@@ -57,6 +57,12 @@ SYNCTHING_UPDATE_FILE='.syncthing-update'
57 57
 CHANGED=
58 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 66
 function new_syncthing_id {
61 67
     for i in {1..8}
62 68
     do