containers-syncthing/syncthingd.sh

24 lines
492 B
Bash
Raw Permalink Normal View History

2022-03-02 15:53:39 +00:00
#!/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} \
2022-09-10 21:26:04 +00:00
/usr/local/bin/syslogize \
2022-03-02 15:53:39 +00:00
/usr/bin/syncthing serve \
2022-03-07 19:55:47 +00:00
--gui-address=http://[::]:8384 \
2022-03-02 15:53:39 +00:00
--no-browser \
--no-restart \
--no-upgrade \
--unpaused
;;
2022-03-15 22:00:45 +00:00
stop)
2022-09-10 21:16:39 +00:00
test ! -f $pid || cat ${pid} | xargs -r kill
rm -f ${pid}
2022-03-15 22:00:45 +00:00
;;
2022-03-02 15:53:39 +00:00
esac