Is there a good way to run a shutdown hook when I shutdown my Ubuntu 18.04 machine? I need to a run a script that might take about 30 seconds, to be specific pushing to git remotes any dangling changes.
Asked
Active
Viewed 4,391 times
1
-
1What you're asking is basically a duplicate, a more specifically this: https://askubuntu.com/a/795406/295286 Personally, I'd do it the other way around, make a script/function that pushes stuff first, then calls shutdown. – Sergiy Kolodyazhnyy Jul 23 '18 at 04:08