Skip to content

Instantly share code, notes, and snippets.

@dstroot
Created May 23, 2012 21:03
Show Gist options
  • Save dstroot/2777821 to your computer and use it in GitHub Desktop.
Save dstroot/2777821 to your computer and use it in GitHub Desktop.
install forever reboot script
#!/bin/bash
echo "*****************************************"
echo " Download the script and add to crontab "
echo "*****************************************"
sudo wget https://raw.github.com/gist/2777778/e92dc28e3f3961e0e2740d262b3ed884a11f6f85/reboot.sh
sudo chmod 777 reboot.sh
sudo line="@reboot ~/reboot.sh >> cron.log 2>&1"
sudo (crontab -l; echo "$line" ) | crontab -
sudo checkconfg crond on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment