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 --- private | 2 +- syncthing/example-pc | 17 --------- utils/syncthing | 99 ---------------------------------------------------- 3 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 syncthing/example-pc delete mode 100755 utils/syncthing diff --git a/private b/private index 1508ba2..fcdc0a0 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 1508ba27828b0b3a260622a9b3170c1de83a59f1 +Subproject commit fcdc0a075885f2190a56f5251908035945ce48dc diff --git a/syncthing/example-pc b/syncthing/example-pc deleted file mode 100644 index 7553b6b..0000000 --- a/syncthing/example-pc +++ /dev/null @@ -1,17 +0,0 @@ -# vim:ft=sh -# PC with hostname example-pc (this is my kind of documentation) - -# Syncthing PC id -ID="0000000-0000000-0000000-0000000-0000000-0000000-0000000-0000000" -# Name of machine -NAME="cynerd-pc" -# Address to machine, can be tcp://address.com or dynamic -ADDRESS="dynamic" - -# Directoris to be synchronized -# Format is ID:PATH -DIRS="Sync:/home/user/Sync -Sync2:/home/user/SyncIt" - -# REST api key -APIKEY="bT6dCxEds9JPwiXMXavGNsXsz7ZFpSC5" 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