X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=mpt-status.init;h=7e72bb0b5acc17aeb380253923c60a9a5454413d;hb=1592872da5619aa057182097e9e7c30c556b2cc6;hp=f9366ffef58d8dc3419ac414f3fc7ca8506d274a;hpb=0a170e84ae011f2da759cdca776c1e929b4ab483;p=sven%2Fmpt-status.git diff --git a/mpt-status.init b/mpt-status.init index f9366ff..7e72bb0 100644 --- a/mpt-status.init +++ b/mpt-status.init @@ -1,6 +1,7 @@ #! /bin/sh # Author: Petter Reinholdtsen +# Author: Sven Hoexter # License: GNU General Public License v2 or later # mpt-statusd - Check mpt-status values in the background. @@ -47,6 +48,10 @@ if [ $RUN_DAEMON = "no" ] ; then exit 0 fi + +#Try to blindly load the mptctl module +modprobe mptctl || true + if ! [ -e "/proc/mpt/version" ] ; then log_failure_msg "The mptctl module is missing." exit 0 @@ -161,7 +166,7 @@ d_stop() { # therefore can be used by a restart d_stop_by_restart() { if [ -f $PIDFILE ] ; then - killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1 + killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1 rm -f $PIDFILE else log_warning_msg "Daemon is already stopped." @@ -170,7 +175,6 @@ d_stop_by_restart() { case "$1" in start) - echo -n "" echo -n $"Starting $DESC: $NAME" d_start ;;