
We dont ever actually import this anywhere or depend on it as a python dependency. Instead, its part of our diskimage-builder elements and is largely an opinionated deployer choice we've made. The only purpose having it in requirements.txt is to pull it in during installation, which should be delegated to ansible/DIB instead. This also manually sync's global-requirements along with the update. Closes-bug: #1526527 Change-Id: I834efb47ccda02a5163c5083836ff29fdc3fdd6f
48 lines
1.1 KiB
Bash
Executable File
48 lines
1.1 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: astara-router-api-server
|
|
# Required-Start: $all
|
|
# Required-Stop: $all
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop:
|
|
# Short-Description: Astara Router API Server
|
|
### END INIT INFO
|
|
|
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
|
DAEMON="/usr/bin/gunicorn"
|
|
NAME="astara-router-api-server"
|
|
OPTIONS="--pythonpath /usr/local/share/astara -c /etc/astara_gunicorn_config.py astara_router.api.server:app"
|
|
PIDFILE=/var/run/gunicorn.pid
|
|
|
|
test -x $DAEMON || exit 0
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
case "$1" in
|
|
start)
|
|
log_daemon_msg "Starting astara-router-api-server" $NAME
|
|
start_daemon -p $PIDFILE $DAEMON $OPTIONS
|
|
log_end_msg $?
|
|
;;
|
|
stop)
|
|
log_daemon_msg "Stopping astara-router-api-server" $NAME
|
|
killproc -p $PIDFILE $DAEMON
|
|
log_end_msg $?
|
|
;;
|
|
force-reload|restart)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
status)
|
|
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
|
|
;;
|
|
*)
|
|
echo "Usage: /etc/init.d/astara-router-api-server {start|stop|restart|force-reload|status}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|