#!/bin/bash # chkconfig: 2345 75 25 # description: forever stop:stop Script # export NODE_ENV= # export NODE_CONFIG_DIR= #お好みで # harmonyで動かしています。 start() { echo -n "Starting forever: " /usr/node/bin/forever start --workingDir=/path/to -c "node --harmony" -a --uid hogehoge /path/to/bin/www return 0 } stop() { /usr/node/bin/forever stop hogehoge return 0 } case "$1" in start) stop start ;; restart)