Last active
May 28, 2018 10:29
-
-
Save jaredchu/8eef1dbb0e6d8b0aa15ad35560f38447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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