Permalink
Browse files

Merge remote branch 'github/master'

  • Loading branch information...
2 parents 5515ac2 + 54fb1f2 commit d02b93631ef96255e0700b64d7817a027e0d729e @maddingue committed Sep 6, 2011
Showing with 22 additions and 16 deletions.
  1. +1 −1 MANIFEST
  2. +1 −1 etc/init.d/xenballoond.debian
  3. +20 −14 etc/init.d/xenballoond.redhat
  4. 0 etc/{config → }/xenballoond.conf
View
@@ -4,7 +4,7 @@ README.rst
Changes
bin/xenballoond
doc/xenballoond_8.PY
-etc/config/xenballoond.conf
+etc/xenballoond.conf
etc/init.d/xenballoond.debian
etc/init.d/xenballoond.redhat
lib/__init__.py
@@ -36,7 +36,7 @@ warn () { echo "$@" >&2 ; }
# program information
NAME="Xen ballooning daemon"
-CONFIG="/etc/xen/xenballoond.conf"
+CONFIG="/etc/xenballoond.conf"
COMMAND="/usr/bin/xenballoond"
PROCESS="xenballoond"
PIDFILE="/var/run/xenballoond.pid"
@@ -36,7 +36,7 @@ warn () { echo "$@" >&2 ; }
# program information
NAME="Xen ballooning daemon"
-CONFIG="/etc/xen/xenballoond.conf"
+CONFIG="/etc/xenballoond.conf"
COMMAND="/usr/bin/xenballoond"
PROCESS="xenballoond"
PIDFILE="/var/run/xenballoond.pid"
@@ -76,6 +76,7 @@ start () {
echo_failure
RETVAL=1
fi
+ echo
}
stop () {
@@ -88,6 +89,7 @@ stop () {
echo_failure
RETVAL=1
fi
+ echo
}
reload () {
@@ -99,24 +101,28 @@ reload () {
# echo "$PROCESS."
}
-status () {
- echo "=== Process Status ========================================="
- status "$PROCESS"
- echo
- ps auxww | head -1
- ps auxww | awk '!/awk|grep|ssh|sh/ && /'$PROCESS'/'
- echo
- echo "=== Last messages from the logs ============================"
- grep -h $PROCESS /var/log/daemon.log /var/log/daemons/info 2>/dev/null | tail
-}
-
# see how we were called
case "$1" in
start) start ;;
stop) stop ;;
- restart) stop ; sleep 1 ; start ;;
+ restart)
+ stop
+ start
+ ;;
+
+ condrestart)
+ if [ -f $PIDFILE ] ; then
+ stop
+ start
+ fi
+ ;;
+
reload) reload ;;
- status) status ;;
+ status)
+ status -p $PIDFILE $PROCESS
+ RETVAL=$?
+ ;;
+
*) echo "usage: `basename $0` {start|stop|restart|reload|status}" >&2
esac
File renamed without changes.

0 comments on commit d02b936

Please sign in to comment.