Skip to content

Instantly share code, notes, and snippets.

@jaredchu
Last active May 28, 2018 10:29
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 jaredchu/8eef1dbb0e6d8b0aa15ad35560f38447 to your computer and use it in GitHub Desktop.
Save jaredchu/8eef1dbb0e6d8b0aa15ad35560f38447 to your computer and use it in GitHub Desktop.
#!/bin/sh
### BEGIN INIT INFO
# Provides: ProviderName
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Short description
# Description: Long Description
### END INIT INFO
do_start()
{
echo "starting!";
/usr/bin/node /home/vagrant/code/real_time_board/socket.js >> /var/log/node.log 2>&1
}
do_stop()
{
echo "stopping!"
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart)
do_stop
do_start
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment