07.12.2024 01:16, David Elie-Dit-Cosaque wrote:
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.
You could try
mkdir -p /etc/systemd/system/-.service.d
cat > /etc/systemd/system/-.service.
Thanks for your reply, I tried this before but could not make it work as I
wanted to. If I remember well, the service kept starting during boot
instead of shutdown. After struggling with it I found this page:
https://unix.stackexchange.com/questions/39226/how-to-run-a-script-with-systemd-right-befo
You should probably just use an ExecStart= (not with the stop you are
currently 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 servi
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
Hi,
in the last days I rewrote openSUSEs rebootmgr to only use sd-varlink,
sd-json and sd-event. It was still based on original libdbus,
pthreads, timers and other stuff not really fitting together.
Using sd-varlink was really simple, even with the missing
documentation. I struggled much more wit