general upgrade
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
f 2022-03-02 12:53:39 -03:00
parent 84191be98e
commit e994542de5
5 changed files with 30 additions and 19 deletions

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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
View 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