On 07/23/2012 09:10 PM, Manolo Martínez wrote:
Hence my question: what's the systemd native way to do stuff (in my
case, remove a module) before shutdown?
You might try something like this (untested as I am not currently
using systemd)- I'm not sure if you need the Before= since your "stuff"
is in ExecStop ... I'm also not sure how to guarantee system logging is
still active when your program runs ... but perhaps there are experts
here who can help.
[unit]
Before=shutdown.target
...
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=<your stuff>
Gene/