Skip to content

Instantly share code, notes, and snippets.

@fmaida
Created September 7, 2016 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmaida/f13149cd1954c5bb79eb1d825ebaa858 to your computer and use it in GitHub Desktop.
Save fmaida/f13149cd1954c5bb79eb1d825ebaa858 to your computer and use it in GitHub Desktop.
The bin/start file I'm actually using on webfaction to start a ghost blog server
#!/bin/sh
procs=$(/home/fmaida/webapps/cesco_it_privato/bin/node /home/fmaida/webapps/cesco_it_privato/ghost/node_modules/forever/bin/forever list | grep -F /home/fmaida/webapps/cesco_it_privato/bin/node)
if [ -z "$procs" ]; then
cd /home/fmaida/webapps/cesco_it_privato/ghost
NODE_ENV=production /home/fmaida/webapps/cesco_it_privato/bin/node /home/fmaida/webapps/cesco_it_privato/ghost/node_modules/forever/bin/forever start -l ~/logs/user/cesco_it_privato-forever.log -o ~/logs/user/cesco_it_privato-stdout.log -e ~/logs/user/cesco_it_privato-stderr.log -a --sourceDir /home/fmaida/webapps/cesco_it_privato/ghost index.js
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment