|Subject:||RE: Starting & stopping applications depending on AC state|
|Date:||Sat, 25 Oct 2014 08:38:39 +0000|
Apologise for the late response.
I will try your suggestion and reply back if I encounter any issue.
Subject: Re: Starting & stopping applications depending on AC state
Date: Mon, 6 Oct 2014 11:30:53 +0200
Monit executes the program directly - not via shell => you need to wrap it if you want to use pipe, etc.:
check program "/bin/bash -c 'upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -qP discharging'"
if status != 0 then exec "/usr/bin/systemctl start application_service"
On 06 Oct 2014, at 06:53, Tom Shirpen <address@hidden> wrote:
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
|[Prev in Thread]||Current Thread||[Next in Thread]|