Created
April 8, 2018 19:16
-
-
Save gskielian/ff48e2fc0e06255dbce2b9688e09317b to your computer and use it in GitHub Desktop.
Forever Start @reboot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage, replace the <path to app.js file> with full path to your node app | |
# set crontab to @reboot <full path to this script> | |
# make sure to chmod +x this script to make it runnable | |
export PATH=/usr/local/bin:$PATH | |
if [ `/usr/local/bin/forever list | /usr/bin/wc -l` -le 1 ]; then | |
/usr/local/bin/forever start <path to app.js file> | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment