Skip to content

Instantly share code, notes, and snippets.

View yani-'s full-sized avatar
🏠
Working from home

Yani Iliev yani-

🏠
Working from home
View GitHub Profile
@yani-
yani- / node_debian_init.sh
Created August 28, 2012 22:20 — forked from obazoud/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28