Commit 65398c33 authored by Paul Cammish's avatar Paul Cammish
Browse files

Update cursor path, dont use sudo when not needed. Fixes issue #279

parent 4d9fe21a
CHANGELOG
---------
2020-03-26
sympl-monit
* Don't use sudo when writing cursor. Fixes issue #279.
* Update sympl-monit.cursor path.
2020-01-27
sympl-webmail
* Fixed importing contacts
......
sympl-monit (10.0.200326.0) stable; urgency=medium
* Don't use sudo when writing cursor. Fixes issue #279.
* Update sympl-monit.cursor path.
-- Paul Cammish <sympl@kelduum.net> Thu, 26 Mar 2020 11:26:00 +0000
sympl-monit (10.0.190704.0) stable; urgency=medium
* Updated monit tests to use TLSv1.2
......
......@@ -3,7 +3,7 @@
set -e
args="--since=today"
[ -e "/var/tmp/sympl-monit.cursor" ] && args="--after-cursor=$(</var/tmp/sympl-monit.cursor)"
[ -e "/tmp/sympl-monit.cursor" ] && args="--after-cursor=$(</tmp/sympl-monit.cursor)"
journalctl -b0 $args -o cat -u "sympl-monit.service" | mail -s "Sympl monitor detected service failure" root
journalctl -b0 $args -o cat -u "sympl-monit.service" | mail -s "Warning: sympl-monit detected service failure" root
......@@ -4,6 +4,6 @@ OnFailure=sympl-monit-failure-email.service
[Service]
Type=simple
ExecStartPre=/bin/sh -c 'journalctl -o cat -n 0 -u %n --show-cursor | cut -f3 -d" " | sudo -u nobody tee /var/tmp/sympl-monit.cursor >/dev/null'
ExecStartPre=/bin/sh -c 'journalctl -o cat -n 0 -u %n --show-cursor | cut -f3 -d" " > /tmp/sympl-monit.cursor'
ExecStart=/usr/sbin/sympl-monit -t email /etc/sympl/monit.d
SuccessExitStatus=75
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