Skip to content

Instantly share code, notes, and snippets.

@corpix
Created July 14, 2012 09:32
Show Gist options
  • Save corpix/3110191 to your computer and use it in GitHub Desktop.
Save corpix/3110191 to your computer and use it in GitHub Desktop.
Forever start
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
###
# index.js >>
# process.setuid('nobody')
# process.setgid('nobody')
###
USER=nobody
GROUP=nobody
OUTLOG="${DIR}/out.log"
ERRLOG="${DIR}/err.log"
touch $OUTLOG
touch $ERRLOG
chown $USER:$GROUP $OUTLOG $ERRLOG
forever start -m 10 -o $OUTLOG -e $ERRLOG "${DIR}/index.js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment