Closed tylerjl closed 8 years ago
Hi @tylerjl, sorry it's been a while with this open - I've been meaning to test it properly but need to set up an environment to do so. I'm going to create a Vagrantfile for development, and as soon as I do I'll test your code and merge it in.
Thanks a lot for your great contribution!
Thanks a lot!
This permits the monitor to correctly watch
Type=oneshot
.service
units that run on a schedule (usingtimer
units) much like a cron job. Normal execution of a oneshot job sends an "info" message, failures are captured, and recoveries are detected the same way as persistent services are.Note that because of the way that systemd thinks about "loaded" units, oneshot services are not loaded (and thus not able to be queried with
GetUnit()
) unless systemd has a reason to load them, for example, as a dependency for a timer. As long as the unit is "loaded" by systemd, the daemon can properly bootstrap the DBusUnit objects that it looks for as a result of their presence in the config file.This also includes a few little
to_s
additions and fixes a small bug in==
in theStateValue
class.Fixes #2