this post was submitted on 05 Feb 2025
10 points (100.0% liked)
Linux Questions
1374 readers
1 users here now
Linux questions Rules (in addition of the Lemmy.zip rules)
- stay on topic
- be nice (no name calling)
- do not post long blocks of text such as logs
- do not delete your posts
- only post questions (no information posts)
Tips for giving and receiving help
- be as clear and specific
- say thank you if a solution works
- verify your solutions before posting them as facts.
Any rule violations will result in disciplinary actions
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm not familiar with Silverblue but home being in /var is sus. Usually it's in /home. But maybe it's mounted in a weird Silverblue way and gets unmounted before it runs.
But running scripts on shutdown is hard to impossible. I always wanted to run automatic updates on shutdown but they don't have networking even if the unit file requires networking. I haven't seen anyone properly manage to do that yet, so good luck. And please make a post if it does end up working. Then I will revisit my own efforts again.
If that's the reason maybe OP can add the shutdown as the last step on the script and execute the script instead of the shut down button as a work around.
No, I really don't want to hijack the UI for this, as it could break with a DE update. And that wouldn't work when shutting down from the console.
Doesn't have to be, e.g. I have a stream deck and mapped a script to one of the buttons. Or put it as an executable file on your desktop or wherever and use it instead of the normal shutdown button.