fix: don't leave lockfiles hanging around
This commit is contained in:
parent
38c39af601
commit
815f9b23d8
2 changed files with 5 additions and 9 deletions
|
@ -4,7 +4,7 @@ pipeline:
|
|||
settings:
|
||||
registry: registry.nulo.in
|
||||
username: sutty
|
||||
repo: registry.nulo.in/sutty/CHANGEME
|
||||
repo: registry.nulo.in/sutty/prometheus
|
||||
tags:
|
||||
- ${ALPINE_VERSION}
|
||||
- latest
|
||||
|
|
|
@ -5,19 +5,15 @@ var=/var/lib/prometheus
|
|||
|
||||
case $1 in
|
||||
stop)
|
||||
test -f "${pid}" || exit 0
|
||||
|
||||
cat "${pid}" | xargs -r kill
|
||||
|
||||
rm "${pid}"
|
||||
test ! -f $pid || cat ${pid} | xargs -r kill
|
||||
rm -f ${pid}
|
||||
;;
|
||||
start)
|
||||
rm -f "${pid}"
|
||||
|
||||
chown prometheus:prometheus "${var}"
|
||||
chown -R prometheus:prometheus "${var}"
|
||||
chmod -R u=rwX,g=rX,o= "${var}"
|
||||
|
||||
daemonize -p "${pid}" -l "${pid}" -u prometheus -c "${var}" \
|
||||
/usr/local/bin/syslogize \
|
||||
/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path="${var}/data"
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue