3132ca51be
Initially the service name was 'servicevm' and 'advsvc' in install file. Now it's been renamed to 'tacker' and 'nfv-role'. Change in install file (tacker/devstack/lib/tacker) was necessary to show the updated names in horizon/dashboard for tacker service. Change-Id: I740f3bfe04525d616c8f7df2847cee8a8d2b1cab Depends-on: I919d77276af72586a20f50239166325adbf9fb11 Depends-on: I097ccbfb7ae192410400b06bd8796e81e62ee65e Closes-Bug: #1524224
69 lines
1.5 KiB
Bash
69 lines
1.5 KiB
Bash
#! /bin/sh
|
|
### BEGIN INIT INFO
|
|
# Provides: tacker-server
|
|
# Required-Start: $remote_fs $syslog
|
|
# Required-Stop: $remote_fs $syslog
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: tacker-server
|
|
# Description: Provides the Tacker service
|
|
### END INIT INFO
|
|
|
|
set -e
|
|
|
|
PIDFILE=/var/run/tacker/tacker-server.pid
|
|
LOGFILE=/var/log/tacker/tacker-server.log
|
|
|
|
DAEMON=/usr/bin/tacker-server
|
|
DAEMON_ARGS="--log-file=$LOGFILE"
|
|
DAEMON_DIR=/var/run
|
|
|
|
ENABLED=true
|
|
|
|
if test -f /etc/default/tacker-server; then
|
|
. /etc/default/tacker-server
|
|
fi
|
|
|
|
mkdir -p /var/run/tacker
|
|
mkdir -p /var/log/tacker
|
|
|
|
. /lib/lsb/init-functions
|
|
|
|
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
|
|
export TMPDIR=/var/lib/tacker/tmp
|
|
|
|
if [ ! -x ${DAEMON} ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
case "$1" in
|
|
start)
|
|
test "$ENABLED" = "true" || exit 0
|
|
log_daemon_msg "Starting tacker server" "tacker-server"
|
|
start-stop-daemon -Sbmv --pidfile $PIDFILE --chdir $DAEMON_DIR --exec $DAEMON -- $DAEMON_ARGS
|
|
log_end_msg $?
|
|
;;
|
|
stop)
|
|
test "$ENABLED" = "true" || exit 0
|
|
log_daemon_msg "Stopping tacker server" "tacker-server"
|
|
start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
|
|
log_end_msg $?
|
|
;;
|
|
restart|force-reload)
|
|
test "$ENABLED" = "true" || exit 1
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
status)
|
|
test "$ENABLED" = "true" || exit 0
|
|
status_of_proc -p $PIDFILE $DAEMON tacker-server && exit 0 || exit $?
|
|
;;
|
|
*)
|
|
log_action_msg "Usage: /etc/init.d/tacker-server {start|stop|restart|force-reload|status}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|