Commit 2f56ec42 authored by Patrick J Cherry's avatar Patrick J Cherry
Browse files

Merge branch 'stretch-monit-systemd-timer' into 'stretch'

Run symbiosis-monit from a systemd timer.

See merge request !48
parents 11a27d13 3b33240f
......@@ -3,7 +3,7 @@ Section: web
Priority: extra
Maintainer: James Carter <>
Uploaders: Patrick J Cherry <>, Steve Kemp <>
Build-Depends: debhelper (>= 7.0.0), txt2man, gem2deb, ruby
Build-Depends: debhelper (>= 7.0.0), txt2man, gem2deb, ruby, dh-systemd
Standards-Version: 3.9.6
XS-Ruby-Versions: all
......@@ -14,7 +14,7 @@
#export DH_RUBY_GEMSPEC=gem.gemspec
dh $@ --buildsystem=ruby --with ruby
dh $@ --buildsystem=ruby --with ruby,systemd
$(MAKE) all
sbin/symbiosis-monit usr/sbin/
sbin/* usr/sbin/
monit.d/* usr/share/symbiosis/monit/checks/
templates/* usr/share/symbiosis/monit/
lib/* usr/lib/ruby/vendor_ruby/
test.d/* etc/symbiosis/test.d/
system/* lib/systemd/system/
set -e
[ -e "/var/tmp/symbiosis-monit.cursor" ] && args="--after-cursor=$(</var/tmp/symbiosis-monit.cursor)"
journalctl -b0 $args -o cat -u "symbiosis-monit.service" | mail -s "Symbiosis monitor detected service failure" root
Description=Notify by email about symbiosis-monit failure
Description=Symbiosis monitor
ExecStartPre=/bin/sh -c 'journalctl -o cat -n 0 -u %n --show-cursor | cut -f3 -d" " | sudo -u nobody tee /var/tmp/symbiosis-monit.cursor >/dev/null'
ExecStart=/usr/sbin/symbiosis-monit -t email /etc/symbiosis/monit.d
Description=Regularly execute symbiosis-monit.service
# run every 2 minutes
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment