Skip to content

Instantly share code, notes, and snippets.

@westtrade
Created September 10, 2016 20:54
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 westtrade/5d8cfca3ffbfaee41844ffba66c6eca0 to your computer and use it in GitHub Desktop.
Save westtrade/5d8cfca3ffbfaee41844ffba66c6eca0 to your computer and use it in GitHub Desktop.
description "vk_socket"
author "Dio"
env PROGRAM_NAME="vk_socket"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn
respawn limit 5 60
script
export NODE_ENV=production
echo $$ > /var/run/$PROGRAM_NAME.pid
export NODE_PATH=$NODE_PATH:/home/dio/.node/node_modules
cd /home/dio/wstmp/vkontakte/socket_server
exec /home/dio/.node/bin/nodemon --exitcrash index.js 2>&1 >> /var/log/vk_socket.log
end script
pre-stop script
rm /var/run/$PROGRAM_NAME.pid
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment