Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-12 Thread David Elie-Dit-Cosaque
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 wrote: > > That is what I told you already. > > > > mkdir /etc/systemd/system/crio-.scope.d > > echo "[Unit]" > /e

Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-12 Thread David Elie-Dit-Cosaque
stand this before. I'll try it. Thanks ! David On Wed, Dec 11, 2024 at 10:05 PM Andrei Borzenkov 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 !

Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-11 Thread David Elie-Dit-Cosaque
David Elie-Dit-Cosaque wrote: > Hi Dan and Andrei, thanks a lot for the explanation and code snippets, I > try it out. > > Thanks, > David. > > On Sun, Dec 8, 2024 at 10:13 AM Dan Nicholson wrote: > >> On Fri, Dec 6, 2024 at 3:16 PM David Elie-Dit-Cosaque >>

Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-09 Thread David Elie-Dit-Cosaque
Hi Dan and Andrei, thanks a lot for the explanation and code snippets, I try it out. Thanks, David. On Sun, Dec 8, 2024 at 10:13 AM Dan Nicholson wrote: > On Fri, Dec 6, 2024 at 3:16 PM David Elie-Dit-Cosaque > wrote: > > > > Hi All, > > > > I am trying to creat

Re: [systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-06 Thread David Elie-Dit-Cosaque
ently using), have it WantedBy=shutdown.target, and Before= any service > which you depend on to still be available > > On Sat, Dec 7, 2024, 00:30 David Elie-Dit-Cosaque > wrote: > >> Hi All, >> >> I am trying to create a systemd service that would execute a script at

[systemd-devel] Help with running a script at shutdown and make it run first before other services

2024-12-06 Thread David Elie-Dit-Cosaque
Hi All, I am trying to create a systemd service that would execute a script at shutdown before any other services start receiving shutdown notifications. I came up with this: [Service] Type=oneshot RemainAfterExit=true ExecStart=/usr/bin/true ExecStop=/usr/local/bin/myscript.sh [Install] WantedBy