<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 23, 2015 at 5:20 PM, Luca Bertoncello <span dir="ltr"><<a href="mailto:L.Bertoncello@queo-group.com" target="_blank">L.Bertoncello@queo-group.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi list!<br>
<br>
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...<br></blockquote><div><br></div><div>Yeah, systemd-devel is still also the tech support list.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
So, to my problem:<br>
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...<br></blockquote><div><br></div><div>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. <i>(Sometimes takes some trial and error though...)</i></div><div><br></div><div>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.</div><div><br></div><div>Also – the unit seems more like a Type=oneshot, not a Type=simple.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>