Reputation: 33
I'm new to Linux and running Mint. I've seen a lot of documentation on creating commands that run when the os is started up from the computer being powered off. Is there a way to make similar commands to run when the os wakes up from hibernate or suspend? (For context, I'm running 'rfkill block bluetooth' on startup and would like to when my pc wakes up from hibernate as well).
Upvotes: 2
Views: 6650
Reputation: 84
place your commands in a script file and ensure you have sufficient owner/permissions to execute in /lib/systemd/system-sleep/ so once your OS suspends from sleep, its going to execute.
For more information man systemd-sleep
https://askubuntu.com/questions/226278/run-script-on-wakeup
Upvotes: 5