Closed alc6379 closed 5 years ago
Right now there's no easy way to hook into the shutdown event and run something, but it sounds like a worthwhile feature. I'd like to rewrite this script in Python to bring in some other requested features, that would be a good opportunity to add this.
Thanks. I wound up just modifying cleanshutd to add the webhook call via cURL. It was straightforward enough, but some type of directory where you could drop ad hoc scripts in, perhaps run in alphanumeric order (01-.sh, 02-.sh, etc) would be pretty neat.
It strikes me, in retrospect, that this would be recreating functionality already supplied by systemd using Before=shutdown.target
and we'd just be muddying the water by creating yet-another-way.
I'm using clean-shutdown, and I'd like to send a message to IFTTT that notifies me when shutdown is imminent.
Is there any hook into clean-shutdown where I can have an additional command run, like doing a post to a web service? I'm sure I can modify the script that is being run, but I didn't know if there was some modularity that allowed me to extend the script built-in.