[systemd-devel] Help with running a script at shutdown and make it run first before other services
David Elie-Dit-Cosaque
deliedit at redhat.com
Thu Dec 12 14:28:40 UTC 2024
Hi Andrei,
Thanks a lot, it worked! Sorry I didn't get it the first time.
David
On Thu, Dec 12, 2024 at 8:05 AM David Elie-Dit-Cosaque <deliedit at redhat.com>
wrote:
> > That is what I told you already.
> >
> > mkdir /etc/systemd/system/crio-.scope.d
> > echo "[Unit]" > /etc/systemd/system/crio-.scope.d/order.conf
> > echo "Before=myscript.service" >>
> > /etc/systemd/system/crio-.scope.d/order.conf
>
> Ah I see, I did not understand this before. I'll try it.
>
> Thanks !
> David
>
> On Wed, Dec 11, 2024 at 10:05 PM Andrei Borzenkov <arvidjaar at gmail.com>
> wrote:
>
>> 12.12.2024 02:37, David Elie-Dit-Cosaque wrote:
>> ...
>> > So I did a test listing every crio-*.scope present in the cluster in
>> the> After= directive and it worked !
>>
>> You started with the question "before any other service". This is rather
>> different from what you are asking now.
>>
>> ...>
>> > Is there a way to use wildcards in After= like After=*.scope or
>> something
>> > equivalent. I cannot hardcode the .scope names because they are random.
>> >
>>
>>
>> That is what I told you already.
>>
>> mkdir /etc/systemd/system/crio-.scope.d
>> echo "[Unit]" > /etc/systemd/system/crio-.scope.d/order.conf
>> echo "Before=myscript.service" >>
>> /etc/systemd/system/crio-.scope.d/order.conf
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20241212/8d1e95d4/attachment.htm>
More information about the systemd-devel
mailing list