mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 09:13:15 +09:00
Adds status to the ubuntu 14.04 flow and gate init.d scripts
This commit is contained in:
1 parent
9c09c0d233
commit
41a599d032
2 files changed
+24
No files matched your search
@@ -17,6 +17,7 @@ NAME=oneflow-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
PID_FILE=/var/run/one/oneflow.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)
|
||||
PID=`cat $PID_FILE`
|
||||
kill -0 $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
|
||||
|
||||
@@ -17,6 +17,7 @@ NAME=onegate-server
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS=""
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
PID_FILE=/var/run/one/onegate.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)
|
||||
PID=`cat $PID_FILE`
|
||||
kill -0 $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
|
||||
|
||||
Reference in new issue
Block a user