This commit is contained in:
parent
84191be98e
commit
e994542de5
5 changed files with 30 additions and 19 deletions
|
@ -15,8 +15,8 @@ pipeline:
|
|||
when:
|
||||
branch: antifascista
|
||||
event: push
|
||||
|
||||
matrix:
|
||||
ALPINE_VERSION:
|
||||
- 3.13.6
|
||||
- 3.14.2
|
||||
- 3.13.7
|
||||
- 3.14.3
|
||||
- 3.15.0
|
||||
|
|
|
@ -3,7 +3,7 @@ ARG BASE_IMAGE=sutty/monit
|
|||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
COPY ./syncthing_start.sh /usr/local/bin/syncthing_start
|
||||
COPY ./syncthingd.sh /usr/local/bin/syncthingd
|
||||
|
||||
# Syncthing runs with Sutty's uid and gid so ownership is kept, because
|
||||
# they are not synced.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
check process syncthing with pidfile /tmp/syncthing.pid
|
||||
start program = "/usr/local/bin/syncthing_start"
|
||||
stop program = "/bin/sh -c 'cat /tmp/syncthing.pid | xargs kill'"
|
||||
start program = "/usr/local/bin/syncthingd start"
|
||||
stop program = "/usr/local/bin/syncthingd stop"
|
||||
|
||||
check filesystem root with path /
|
||||
if space usage < 2% then alert
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
pid=/tmp/syncthing.pid
|
||||
dir=/home/syncthing
|
||||
log=${dir}/syncthing.log
|
||||
|
||||
rm -f ${pid}
|
||||
|
||||
install -dm 2750 -o syncthing -g syncthing ${dir}/Sync/.stfolder
|
||||
|
||||
daemonize -p ${pid} -l ${pid} -u syncthing -c ${dir} \
|
||||
-o ${log} -a -e ${log} \
|
||||
/usr/bin/syncthing -no-browser -gui-address='http://0.0.0.0:8443'
|
21
syncthingd.sh
Executable file
21
syncthingd.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
pid=/tmp/syncthing.pid
|
||||
dir=/home/syncthing
|
||||
|
||||
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} \
|
||||
/usr/bin/syncthing serve \
|
||||
--skip-port-probing \
|
||||
--no-browser \
|
||||
--no-restart \
|
||||
--no-upgrade \
|
||||
--unpaused
|
||||
;;
|
||||
stop) cat ${pid} | xargs -r kill ;;
|
||||
esac
|
Loading…
Reference in a new issue