Reputation: 175
By execution of a bash script which takes a long time to run I will prevent a manual executed system sleep/shutdown/reboot. It would be nice if the logged on user will get a message but it´s not necessary. Normally I´m looking for a working solution for OS X but for Linux would also be nice.
Upvotes: 0
Views: 1735
Reputation: 90711
On OS X, you can use the caffeinate -s /path/to/your/script
command to prevent sleep while your script runs.
Upvotes: 2