From 012db8bad13f67c69f4042b81ca3c9bf098343e5 Mon Sep 17 00:00:00 2001 From: Shane Perry Date: Thu, 25 May 2017 21:19:46 -0500 Subject: [PATCH] Generates full syncthing config; removes warning about authentication at startup; Adds Default folder --- start.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index dc4ff2b..38191a1 100755 --- a/start.sh +++ b/start.sh @@ -3,9 +3,15 @@ set -eu mkdir -p /app/data/config +chown -R cloudron:cloudron /app/data/config /app/data & -if ! [ -f /app/data/config/config.xml ]; then - cp /app/code/config.xml.default /app/data/config/config.xml +# if this if the first run, generate a useful config +if [ ! -f /app/data/config/config.xml ]; then + echo "=> Generating config" + /app/code/syncthing --generate="/app/data/config" + # don't take the whole volume with the default so that we can add additional folders + sed -i "s/path=\"\/root\/Sync\/\" /path=\"\/app\/data\/default\/\"/g" /app/data/config/config.xml + sed -e 's,.*,tcp://:22000,' -i /app/data/config/config.xml fi cat >/run/ldap.conf <.*,tcp://:22000,' -i /app/data/config/config.xml -sed -e 's,,,' -i /app/data/config/config.xml - export STNODEFAULTFOLDER=1 STNOUPGRADE=1 exec busybox init