Generates full syncthing config; removes warning about authentication at startup; Adds Default folder

This commit is contained in:
Shane Perry 2017-05-25 21:19:46 -05:00
parent 4e805ba62f
commit 012db8bad1
1 changed files with 8 additions and 5 deletions

View File

@ -3,9 +3,15 @@
set -eu set -eu
mkdir -p /app/data/config mkdir -p /app/data/config
chown -R cloudron:cloudron /app/data/config /app/data &
if ! [ -f /app/data/config/config.xml ]; then # if this if the first run, generate a useful config
cp /app/code/config.xml.default /app/data/config/config.xml 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,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:22000</listenAddress>,' -i /app/data/config/config.xml
fi fi
cat >/run/ldap.conf <<EOF cat >/run/ldap.conf <<EOF
@ -19,9 +25,6 @@ ldap_server cloudron {
} }
EOF EOF
sed -e 's,<listenAddress>.*</listenAddress>,<listenAddress>tcp://:22000</listenAddress>,' -i /app/data/config/config.xml
sed -e 's,<gui .*>,<gui enabled="true" tls="false" debugging="false">,' -i /app/data/config/config.xml
export STNODEFAULTFOLDER=1 STNOUPGRADE=1 export STNODEFAULTFOLDER=1 STNOUPGRADE=1
exec busybox init exec busybox init