20 lines
449 B
Plaintext
Executable File
20 lines
449 B
Plaintext
Executable File
BINARY=~/Downloads/.syncthing/syncthing
|
|
|
|
myID=`${BINARY} --device-id`
|
|
|
|
MASTER_LIST=/zz/zPrivate/secrets/master.list
|
|
SHARE_LIST=/zz/zPrivate/secrets/share.list
|
|
|
|
grep -v ${myID} ${MASTER_LIST} ${SHARE_LIST} > /tmp/final.1
|
|
|
|
syncthing cli config folders list > /tmp/final.2
|
|
|
|
for i in `cat /tmp/final.1`
|
|
do
|
|
echo $i
|
|
for j in `cat /tmp/final.2`
|
|
do
|
|
echo $j
|
|
syncthing cli config folders $j devices add --device-id=$i
|
|
done
|
|
done |