Add files for syncthing container

This commit is contained in:
2016-03-22 23:29:25 +01:00
parent d4381991e1
commit 1bfb086c90
4 changed files with 47 additions and 0 deletions

9
build/boot/syncthing.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
set -e
if [ ! -f $SYNCTHING_CONFIG ]; then
/opt/syncthing/syncthing --generate="$SYNCTHING_CONFIG"
# don't take the whole volume with the default so that we can add additional folders
sed -e "s~id=\"default\" path=\"/root/Sync\"~id=\"default\" path=\"$SYNCTHING_DATA/default\"~" -i $SYNCTHING_CONFIG/config.xml
# ensure we can see the web ui outside of the docker container
sed -e "s/<address>127.0.0.1:8384/<address>0.0.0.0:8080/" -i $SYNCTHING_CONFIG/config.xml
fi