use syslog, start/stop correctly
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
4f1f5c27d0
commit
11cb290ae8
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue