Last active
May 15, 2016 07:06
-
-
Save puhitaku/8fbdf5a39899041a85ae936f124f58de to your computer and use it in GitHub Desktop.
Physical Router Driver init script
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 /etc/rc.common | |
# AUTHOR: Takumi Sueda <puhitaku@gmail.com> | |
START=92 | |
USE_PROCD=1 | |
PROG=/usr/bin/gunicorn | |
DAEMON=${PROG} | |
# Location of the pid file | |
PIDFILE=/tmp/gunicorn.pid | |
start_service() | |
{ | |
procd_open_instance | |
procd_set_param command $PROG --chdir /root/physical_router_driver -b 0.0.0.0:80 -p $PIDFILE main:app | |
procd_close_instance | |
} | |
stop_service() | |
{ | |
kill $(cat $PIDFILE) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment