diff --git a/iguanaIR.init b/iguanaIR.init index 2491204..7703f13 100755 --- a/iguanaIR.init +++ b/iguanaIR.init @@ -71,6 +71,11 @@ elif [ "$DISTRO" = "gentoo" ]; then { eend $* } + # there is no pidofproc in gentoo + pidofproc() + { + pidof "$@" + } else if [ "$DISTRO" != "debian" -a "$DISTRO" != "ubuntu" ]; then echo "WARNING: failed to recognize distro, defaulting to Debian." @@ -96,6 +101,11 @@ depends() RETVAL=0 } +depend() +{ + before lircd +} + start() { # figure out what command to run to start the daemon @@ -104,7 +114,7 @@ start() START="daemon --user=iguanair $IGPATH $IGUANAIR_OPTIONS -l $LOGFILE" fi else - START="start-stop-daemon --start --chuid iguanair --group iguanair --exec $IGPATH -- $IGUANAIR_OPTIONS -l $LOGFILE" + START="start-stop-daemon --start --user iguanair --group iguanair --exec $IGPATH -- $IGUANAIR_OPTIONS -l $LOGFILE" fi if [ "$START" != "" ]; then @@ -138,7 +148,7 @@ stop() if [ "$LOCKFILE" != "" ]; then killproc $IGPATH else - start-stop-daemon --stop --oknodo --retry 2 --exec $IGPATH + start-stop-daemon --stop --exec $IGPATH fi RETVAL=$? log_end_msg $RETVAL