@@ -106,7 +106,7 @@
case "$1" in
start)
- echo -n "Starting nprobe "
+ echo "Starting nprobe ..."
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
for ADDR in ${NPROBE_COLLECTORS} ; do
@@ -133,13 +133,14 @@
;;
esac
fi
- /sbin/startproc $NPROBE_BIN -g /var/run/nprobe/nprobe.pid -i ${NPROBE_IFACE} ${NF_VERSION} ${COLLECTOR_OPTS} ${NPROBE_OPTS}
-
- # Remember status and be verbose
+ for ${IFACE} in ${NPROBE_IFACE} ; do
+ echo -n "instance on interface ${IFACE} "
+ /sbin/startproc $NPROBE_BIN -g /var/run/nprobe/nprobe-${IFACE}.pid -i ${IFACE} ${NF_VERSION} ${COLLECTOR_OPTS} ${NPROBE_OPTS}
rc_status -v
+ done
;;
stop)
- echo -n "Shutting down nprobe "
+ echo "Shutting down nprobe ..."
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
@@ -174,7 +175,7 @@
rc_status
;;
status)
- echo -n "Checking for service nprobe "
+ echo "Checking for service nprobe ..."
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
@@ -187,17 +188,19 @@
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
- /sbin/checkproc $NPROBE_BIN
- # NOTE: rc_status knows that we called this init script with
- # "status" option and adapts its messages accordingly.
+ for ${IFACE} in ${NPROBE_IFACE} ; do
+ echo -n "instance on interface ${IFACE} "
+ /sbin/checkproc -p /var/run/nprobe/nprobe-${IFACE}.pid $NPROBE_BIN
rc_status -v
+ done
;;
probe)
## Optional: Probe for the necessity of a reload, print out the
## argument to this init script which is required for a reload.
## Note: probe is not (yet) part of LSB (as of 1.9)
-
- test /etc/sysconfig/nprobe -nt /var/run/nprobe/nprobe.pid && echo reload
+ for ${IFACE} in ${NPROBE_IFACE} ; do
+ test /etc/sysconfig/nprobe -nt /var/run/nprobe/nprobe-${IFACE}.pid && echo reload
+ done
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|