summary refs log tree commit diff
path: root/os/etc/s6-rc/src/syncthing-srv/run
diff options
context:
space:
mode:
Diffstat (limited to 'os/etc/s6-rc/src/syncthing-srv/run')
-rw-r--r--os/etc/s6-rc/src/syncthing-srv/run12
1 files changed, 12 insertions, 0 deletions
diff --git a/os/etc/s6-rc/src/syncthing-srv/run b/os/etc/s6-rc/src/syncthing-srv/run
new file mode 100644
index 0000000..d1eaf74
--- /dev/null
+++ b/os/etc/s6-rc/src/syncthing-srv/run
@@ -0,0 +1,12 @@
+#!/bin/execlineb -P
+
+envfile /etc/s6-rc/config/user.conf
+importas -iu USER USER
+
+backtick -E -D /tmp HOME { homeof ${USER} }
+s6-setuidgid ${USER}
+export HOME ${HOME}
+foreground { install -d ${HOME}/.config/syncthing }
+
+fdmove -c 2 1
+exec /usr/bin/syncthing serve --no-browser --home=${HOME}/.config/syncthing --gui-address=http://127.0.0.1:8384 --logfile=/dev/null