[systemd-devel] timed events

Kok, Auke-jan H auke-jan.h.kok at intel.com
Thu Jun 28 19:31:40 PDT 2012


On Fri, Jun 29, 2012 at 12:49 AM, Nathan <qwerty.nat at gmail.com> wrote:
> Hello,
>
> I have built systemd version 26 for red hat enterprise 6.2. It works well.
>
> I am trying to replace a half broken init system/service management
> system we have running which was built in-house (and all the developers
> have left)
>
> I am even managing some daemons of my own with it successfully.
>
> Looking at the systemd.timer documentation it seems as though all
> the timers are relative. Is there any way to get absolute timers
> relative to real time (cron like functionality - even in a later version?).

not currently, the timer could should be expanded but it's not that
simple to write
something like that consistently.

> Another issue (though slightly related) is we have an external binary
> that when run will return 0 or 1 depending if we should run a service
> is there a way to run this command in the service_name.service and start the
> service if it returns 0  and stop the service if the script
> returns 1 (retrying the script every 5 minutes or so).

cheap trick: make a script and run it from a timer, have the script
run `systemctl ...`

better trick: fix the daemon to do all of this properly.

> Finally are there acls (or similar) so that user X can manage the state of
> his services and only his services?

yes, with systemd --user, you can run separate instances for different
UID's that can only be managed by each UID individually.

Auke


More information about the systemd-devel mailing list