diff options
| author | Alan Conway <aconway@apache.org> | 2006-12-23 17:20:37 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2006-12-23 17:20:37 +0000 |
| commit | 6536407690660e10529c826ab3aa21baaa121ea1 (patch) | |
| tree | aacbd4397be2fc04e394d77f83732bd77e5f4b99 /cpp/etc/qpidd | |
| parent | a958033ea68c9154da02d4378c4031f9dc02897e (diff) | |
| download | qpid-python-6536407690660e10529c826ab3aa21baaa121ea1.tar.gz | |
- rpm: make rpm now builds RPMs under rpm/ directory.
- src/qpidd.cpp: added --daemon option to run as daemon.
- etc/qpidd: fixed bugs in init.rc script.
- qpidc.spec: fixed rpmlint warnings, added apache URL
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@489905 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/etc/qpidd')
| -rwxr-xr-x | cpp/etc/qpidd | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/cpp/etc/qpidd b/cpp/etc/qpidd index 0c6041b063..cfd6049c9b 100755 --- a/cpp/etc/qpidd +++ b/cpp/etc/qpidd @@ -3,32 +3,21 @@ # qpidd Startup script for the Qpid messaging daemon. # # chkconfig: - 85 15 -# description: Qpidd is an AMQP broker. It receives, stores and routes -# messages sent using the AMQP protcol. +# description: Qpidd is an AMQP broker. It receives, stores, routes and forwards messages using the AMQP protcol. # processname: qpidd -# pidfile: /var/run/qpidd.pid # -# NB: add config: entries here when qpidd gets a config file. + +prog=qpidd +lockfile=/var/lock/subsys/$prog # Source function library. . /etc/rc.d/init.d/functions -if [ -f /etc/sysconfig/qpidd ]; then - . /etc/sysconfig/qpidd -fi - -# Start qpidd in the C locale by default. -QPIDD_LANG=${QPIDD_LANG-"C"} - -qpidd=${QPIDD-/usr/sbin/qpidd} -prog=qpidd -pidfile=${PIDFILE-/var/run/qpidd.pid} -lockfile=${LOCKFILE-/var/lock/subsys/qpidd} RETVAL=0 start() { - echo -n $"Starting $prog: " - LANG=$QPIDD_LANG daemon $qpidd $OPTIONS + echo -n $"Starting Qpid AMQP daemon: " + daemon $prog --daemon RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} @@ -36,18 +25,16 @@ start() { } stop() { - echo -n $"Stopping $prog: " - killproc 2 $qpidd + echo -n $"Stopping Qpid AMQP daemon: " + killproc $prog RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} } -reload() { - echo -n $"Reloading $prog: " - killproc $qpidd -HUP - RETVAL=$? - echo +restart() { + stop + start } # See how we were called. @@ -59,24 +46,20 @@ case "$1" in stop ;; status) - status $qpidd + status $prog RETVAL=$? ;; - restart) - stop - start + restart|reload) + restart ;; condrestart) - if [ -f ${pidfile} ] ; then - stop - start - fi + if [ -e $lockfile ] ; then restart ; fi ;; reload) reload ;; *) - echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}" + echo $"Usage: $0 {start|stop|restart|condrestart|reload|status}" exit 1 esac |
