Hi all. I was recently experimenting with automating commands when shutting down the system. In the process, I made a file push.service
in /usr/lib/systemd/system-shutdown/
that was:
[Unit]
Description=Run mycommand at shutdown
Requires=network.target
DefaultDependencies=no
Before=shutdown.target reboot.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=<some git commands I entered for auto-pushing of stuff>
[Install]
WantedBy=multi-user.target
based on: this article (and of course I did something that I wasn’t supposed to, and the mistake I made while trying to test it led me here to the forums :P).
After I do this and save the changes, shutting down keeps me stuck while showing me various process and green coloured OK
s for them. I then tried removing that file and upon one instance of rebooting and trying to shutdown (this is after removing the file), it showed watchdog0: watchdog has not stopped!
(paraphrasing from memory). I did the fix mentioned in this forum post’s reply and the watchdog
message stopped appearing, but the situation of it not shutting down still remains. As for the logs I have to mention here, I am a total newbie, so please point me to what I need to do. Thanks