containers-syncthing/syncthingd.sh

24 lines
492 B
Bash
Executable File

#!/bin/sh
pid=/tmp/syncthing.pid
dir=/home/syncthing
case $1 in
start)
install -dm 2750 -o syncthing -g syncthing ${dir}/Sync/.stfolder
daemonize -p ${pid} -l ${pid} -u syncthing -c ${dir} \
/usr/local/bin/syslogize \
/usr/bin/syncthing serve \
--gui-address=http://[::]:8384 \
--no-browser \
--no-restart \
--no-upgrade \
--unpaused
;;
stop)
test ! -f $pid || cat ${pid} | xargs -r kill
rm -f ${pid}
;;
esac