use syslog, start/stop correctly
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2022-09-10 18:16:39 -03:00
parent 4f1f5c27d0
commit 11cb290ae8

View file

@ -2,16 +2,13 @@
pid=/tmp/syncthing.pid
dir=/home/syncthing
log=/home/syncthing/syncthing.log
case $1 in
start)
rm -f ${pid}
install -dm 2750 -o syncthing -g syncthing ${dir}/Sync/.stfolder
daemonize -p ${pid} -l ${pid} -u syncthing -c ${dir} \
-a -e ${log} -o ${log} \
/usr/bin/syslogize \
/usr/bin/syncthing serve \
--gui-address=http://[::]:8384 \
--no-browser \
@ -20,6 +17,7 @@ case $1 in
--unpaused
;;
stop)
cat ${pid} | xargs -r kill
test ! -f $pid || cat ${pid} | xargs -r kill
rm -f ${pid}
;;
esac