diff --git a/.woodpecker.yml b/.woodpecker.yml index 0047271..16af47f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -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 diff --git a/prometheusd.sh b/prometheusd.sh index 6fee544..b9b4e2f 100755 --- a/prometheusd.sh +++ b/prometheusd.sh @@ -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