Removing syncthing users from the config

This commit is contained in:
Bob Mottram 2016-11-02 20:01:50 +00:00
parent 4c66ac644c
commit 8ea00a278e
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,12 @@ SYNCTHING_UPDATE_FILE='.syncthing-update'
CHANGED= CHANGED=
TEMP_IDS_FILE=/root/.synthingids TEMP_IDS_FILE=/root/.synthingids
function remove_user_syncthing {
remove_username="$1"
sed -i "/<folder id=\"${remove_username}\" /,/</folder>/d" $SYNCTHING_CONFIG_FILE
}
function new_syncthing_id { function new_syncthing_id {
for i in {1..8} for i in {1..8}
do do