fwiw, halt-local.service was hooked up in final.target and contains the following:
[Unit] Description=/usr/sbin/halt.local Compatibility ConditionFileIsExecutable=/usr/sbin/halt.local DefaultDependencies=no After=shutdown.target Before=final.target
To apply that to my /etc/systemd/system/foo.service example:
[Unit] Description=Run service on shutdown DefaultDependencies=no After=shutdown.target Before=final.target
[Service] ExecStart=/bin/true
[Install] WantedBy=final.target
Then run "systemctl enable foo.service" and you should be set.
fwiw, halt-local.service was hooked up in final.target and contains the following:
[Unit] /usr/sbin/ halt.local Compatibility Executable= /usr/sbin/ halt.local cies=no target
Description=
ConditionFileIs
DefaultDependen
After=shutdown.
Before=final.target
To apply that to my /etc/systemd/ system/ foo.service example:
[Unit] cies=no target
Description=Run service on shutdown
DefaultDependen
After=shutdown.
Before=final.target
[Service]
ExecStart=/bin/true
[Install] final.target
WantedBy=
Then run "systemctl enable foo.service" and you should be set.