From eb3d4c9a3f469d80d5e6c9ae241caef17c1568a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 16 Nov 2022 09:59:06 +0100 Subject: syncthing: remove as I am not using it --- utils/syncthing | 99 --------------------------------------------------------- 1 file changed, 99 deletions(-) delete mode 100755 utils/syncthing (limited to 'utils') diff --git a/utils/syncthing b/utils/syncthing deleted file mode 100755 index fe23586..0000000 --- a/utils/syncthing +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh -set -e - -[ -d syncthing ] || (echo "There is no configuration directory" >&2; exit 1) -HOST="$(hostname)" -[ -f syncthing/"$HOST" ] || (echo "Host $HOST seems to be unconfigured" >&2; exit 1) - -TMPCNF="/tmp/syncthing.conf.xml" -[ -f $TMPCNF ] && rm $TMPCNF - -# Begin configuration -echo "" >$TMPCNF - -for h in syncthing/*; do - # Source host - . "$h" - - # Set to configuration - echo " " >>$TMPCNF - echo "
$ADDRESS
" >>$TMPCNF - echo "
" >>$TMPCNF - - # Parse DIRS of this host - eval `echo "$DIRS" | sed -ne 's/^\([^:]*\):.*$/ST_DIR_HOSTS_\1="$ST_DIR_HOSTS_\1 $ID"/p'` -done - -# Now again source target host -. syncthing/"$HOST" - - -while read -r d; do - # Get name of the directory - NM="$(echo "$d" | sed 's/:.*$//')" - # Get target path - PTH="$(echo "$d" | sed 's/^[^:]*://')" - # Write folder init - echo " " >>$TMPCNF - # Specify every all devices - for dev in eval `echo \$ST_DIR_HOSTS_$NM`; do - echo " " >>$TMPCNF - done - # Write common configs (TODO do we want to have chance to change it?) - echo " 1 - - 0 - 0 - 0 - random - false - 0 - 0 - 0 - 10 - false - false - true" >>$TMPCNF - # Write folder end - echo " " >>$TMPCNF -done <<<"$DIRS" - -# Some defaults (TODO again do we care about those on various hosts) -echo " -
127.0.0.1:8384
- $APIKEY - dark -
- - default - default - true - true - 21027 - [ff12::8384]:21027 - 0 - 0 - 60 - true - 10 - true - true - 60 - 30 - 10 - 1800 - true - 12 - 24 - false - 5 - true - false - 1 - https://upgrades.syncthing.net/meta.json - false - 10 - " >>$TMPCNF - -# End configuration -echo "
" >>$TMPCNF -- cgit v1.2.3