Last active
January 2, 2016 23:08
-
-
Save DarrylDias/8374151 to your computer and use it in GitHub Desktop.
Ghost starter script.
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
#!/usr/bin/bash | |
if [ $(ps aux | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ] | |
then | |
export PATH=/usr/bin:$PATH | |
#export PATH=/usr/local/bin:$PATH # If Node.js is source complied. | |
export NODE_ENV=production | |
NODE_ENV=production forever start --sourceDir /path/to/your/ghost index.js >> /var/log/nodelog.log 2>&1 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment