This script requires Ruby, and it works on Mac and Linux.
git clone https://github.com/ndbroadbent/goto_sleep.git
cd goto_sleep
./install.sh
Notification cron tasks will be set up for the current user, and a shutdown cron task will be set up for the root user.
The default shutdown time is 2:30am. The default warning notifications are at 45 minutes, 20 minutes, and 5 minutes before shutdown.
You can configure these in config.yml
.
./uninstall.sh
cd ..
rm -rf goto_sleep