On 03/11/13 14:54, Mark Seger wrote:
Hello Mark and Chris,
> for all things debian I'm copying the maintainer and see if he cares
> to comment on your patch. I am getting ready to push a new release so
> if it's good with him it's good with me.
This just requires a trivial fix with a quick logic flip. Mark, here is a
simple patch that should make the init script work on both busybox and stock
Debian systems.
Troy
diff --git a/initd/collectl-debian b/initd/collectl-debian
index bfbda47..d7ce421 100755
--- a/initd/collectl-debian
+++ b/initd/collectl-debian
@@ -65,8 +65,8 @@ PIDFILE="/var/run/$PNAME.pid"
case "$1" in
start)
echo -n "Starting collectl: $PNAME"
- start-stop-daemon --quiet --start --exec $PERL --pidfile $PIDFILE --test
>/dev/null
- if [ $? -eq 0 ]; then
+ start-stop-daemon --quiet --stop --exec $PERL --pidfile $PIDFILE --test
>/dev/null
+ if [ $? -eq 1 ]; then
start-stop-daemon --quiet --start --exec $COLLECTL -- -D $SWITCHES
$PSWITCH
echo "."
else
@@ -86,8 +86,8 @@ case "$1" in
;;
flush)
- start-stop-daemon --quiet --start --exec $PERL --pidfile $PIDFILE --test
>/dev/null
- if [ $? -eq 1 ]; then
+ start-stop-daemon --quiet --stop --exec $PERL --pidfile $PIDFILE --test
>/dev/null
+ if [ $? -eq 0 ]; then
echo "Flushing buffers for $PNAME"
kill -s USR1 `cat $PIDFILE`
else
@@ -96,8 +96,8 @@ case "$1" in
;;
status)
- start-stop-daemon --quiet --start --exec $PERL --pidfile $PIDFILE --test
>/dev/null
- if [ $? -eq 1 ]; then
+ start-stop-daemon --quiet --stop --exec $PERL --pidfile $PIDFILE --test
>/dev/null
+ if [ $? -eq 0 ]; then
echo "$PNAME is running..."
else
echo "$PNAME is not running"
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Collectl-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/collectl-interest