Pretty sure there isn't a way for your bash session to trap the shutdown and run a script, so yes, systemd appears to be the only way. systemd services are pretty easy to set up...Thank you bls
In my searches I actually stumbled a systemd solution like this,
but was wondering If a bash file, something like .bash_logout might exist,
but named .bash_shutdown for example..
I guess there isn't, and systemd is the only way..
One more thing: If you want your personal shutdown script to run even if you're not logged in, you'll need to enable 'linger' on your account:
Code:
loginctl enable-linger
Statistics: Posted by bls — Thu Aug 29, 2024 6:41 pm