There is a lot of solution here to execute a script at shutdown/reboot, but I want my script to only execute at shutdown.
I've tried to put my script in /usr/lib/systemd/systemd-shutdown, and check the $1 parameter, as seen here, but it doesn't work.
Any ideas ?
system : archlinux with gnome-shell
$systemctl --version
systemd 229
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN
/etc/systemd/system/. The/usr/lib/systemd/system/directory is meant to be used for system-provided scripts. – ILMostro_7 May 21 '16 at 9:27