Skip to content

Instantly share code, notes, and snippets.

@andypotanin
Created March 9, 2014 10:56
Show Gist options
  • Select an option

  • Save andypotanin/9446039 to your computer and use it in GitHub Desktop.

Select an option

Save andypotanin/9446039 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# My Run Node.js services.
#
# chkconfig: - 90 10
# description: My Service Application.
# processname: my-app
# config: /etc/my-app/my-app.yaml
# pidfile: /var/run/my-app.pid
#
# Variables
USER="root"
NODE="/usr/local/bin/node"
DAEMON="/var/lib/my-app/index.js"
LOGS="/var/log/my-app"
PID="/var/run/my-app.pid"
CONFIG="/etc/my-app/my-app.yaml"
# Run Application My Application
runuser -l "$USER" -c "my-app start -c $CONFIG" >> $LOGS/my-app.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment