Fix Arch init script

This commit is contained in:
Michiel Broek 2011-08-08 14:39:53 +02:00
parent 126191ffa3
commit 40b28e7360
2 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,4 @@
v0.95.13 08-Aug-2011
general: general:
Added support for Arch Linux. Added support for Arch Linux.

View File

@ -5,7 +5,7 @@
. /etc/rc.conf . /etc/rc.conf
. /etc/rc.d/functions . /etc/rc.d/functions
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'` MBSE_ROOT=$(cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}')
export MBSE_ROOT export MBSE_ROOT
case "$1" in case "$1" in
@ -16,7 +16,7 @@ start)
rm -f ${MBSE_ROOT}/var/*.LCK rm -f ${MBSE_ROOT}/var/*.LCK
rm -f ${MBSE_ROOT}/tmp/mb* rm -f ${MBSE_ROOT}/tmp/mb*
su mbse -c '${MBSE_ROOT}/bin/mbtask' >/dev/null su mbse -c '${MBSE_ROOT}/bin/mbtask' >/dev/null
add_daemon mbtask add_daemon mbsebbs
sleep 2 sleep 2
if [ -f ${MBSE_ROOT}/etc/config.data ]; then if [ -f ${MBSE_ROOT}/etc/config.data ]; then
su mbse -c '${MBSE_ROOT}/bin/mbstat open -quiet' su mbse -c '${MBSE_ROOT}/bin/mbstat open -quiet'
@ -45,10 +45,10 @@ stop)
fi fi
done done
if [ -f ${MBSE_ROOT}/var/run/mbtask ]; then if [ -f ${MBSE_ROOT}/var/run/mbtask ]; then
kill -9 `cat ${MBSE_ROOT}/var/run/mbtask` kill -9 $(cat ${MBSE_ROOT}/var/run/mbtask)
fi fi
fi fi
rm_daemon mbtask rm_daemon mbsebbs
stat_done stat_done
;; ;;
restart) restart)