1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

Added status to Sunstone init scripts for Ubuntu

This commit is contained in:
Boris Parak 2014-04-30 20:23:04 +02:00 committed by Jaime Melis
parent 8c3e2057c7
commit 8be4a1f09b
3 changed files with 36 additions and 0 deletions

View File

@ -17,6 +17,7 @@ NAME=econe-server
DAEMON=/usr/bin/$NAME
DAEMON_ARGS=""
SCRIPTNAME=/etc/init.d/$NAME
PID_FILE=/var/run/one/econe-server.pid
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@ -63,6 +64,17 @@ case "$1" in
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
ECONE_PID=`cat $PID_FILE`
kill -0 $ECONE_PID > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
log_daemon_msg "$NAME is running"
log_end_msg 0
else
log_daemon_msg "$NAME is not running"
log_end_msg 1
fi
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the

View File

@ -17,6 +17,7 @@ NAME=occi-server
DAEMON=/usr/bin/$NAME
DAEMON_ARGS=""
SCRIPTNAME=/etc/init.d/$NAME
PID_FILE=/var/run/one/occi-server.pid
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@ -63,6 +64,17 @@ case "$1" in
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
OCCI_PID=`cat $PID_FILE`
kill -0 $OCCI_PID > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
log_daemon_msg "$NAME is running"
log_end_msg 0
else
log_daemon_msg "$NAME is not running"
log_end_msg 1
fi
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the

View File

@ -17,6 +17,7 @@ NAME=sunstone-server
DAEMON=/usr/bin/$NAME
DAEMON_ARGS=""
SCRIPTNAME=/etc/init.d/$NAME
PID_FILE=/var/run/one/sunstone.pid
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@ -63,6 +64,17 @@ case "$1" in
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
SUNSTONE_PID=`cat $PID_FILE`
kill -0 $SUNSTONE_PID > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
log_daemon_msg "$NAME is running"
log_end_msg 0
else
log_daemon_msg "$NAME is not running"
log_end_msg 1
fi
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the