This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/script/mbse.stop

39 lines
818 B
Plaintext
Raw Normal View History

2001-08-17 05:46:24 +00:00
#
# ~/bin/mbse.start
# BBS Shutdown script, should be run as BBS owner.
2001-08-25 19:53:11 +00:00
# Note: this is only used on Slackware and FreeBSD systems.
2001-08-17 05:46:24 +00:00
#
2001-08-25 19:53:11 +00:00
# 13-Aug-2001 MB.
2001-08-17 05:46:24 +00:00
export PATH="/sbin:/usr/sbin:/bin:/usr/bin:$MBSE_ROOT/bin:"
if [ "$MBSE_ROOT" = "" ]; then
export MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
fi
if [ -f $MBSE_ROOT/bin/mbtask ]; then
echo -n "Shutdown MBSE BBS: "
if [ -f $MBSE_ROOT/etc/config.data ]; then
echo -n "closing the bbs "
cd $MBSE_ROOT
$MBSE_ROOT/bin/mbstat close wait -quiet
echo -n "done, "
fi
# Now kill the daemons
echo -n "kill "
base=`basename mbtask`
pid=`pidof $base`
echo -n "mbtask "
if ps h $pid >/dev/null 2>&1; then
kill $pid
RC=$?
[ $RC -eq 0 ] && echo -n "ok " || echo -n "failed "
fi
echo ""
else
echo "mbtask not available!"
fi
#