On Wed, Sep 23, 2015 at 5:20 PM, Luca Bertoncello < l.bertonce...@queo-group.com> wrote:
> Hi list! > > I'm new here and I hope, I'm in topic... I don't want to develop system, > but I didn't found a "system-user"-ML... > Yeah, systemd-devel is still also the tech support list. > So, to my problem: > I need a possibility to call a script on shutdown/reboot/halt (I use > CentOS 7). This **MUST** be the first one be called, since it needs many > other service to be running... > Almost always, being "first" is a made up requirement. The actually important part here is "it needs many other services" – and you probably know /which/ specific services it needs, so you can declare them as dependencies in your unit. *(Sometimes takes some trial and error though...)* In systemd, the shutdown order is generally inverse of the boot order – if a unit has "After=X", it will be started after X, but stopped before X. So your unit should have a Requires= (or Wants=) plus an After= for every service it actually needs. Also – the unit seems more like a Type=oneshot, not a Type=simple. -- Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel