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/maint

29 lines
644 B
Plaintext
Raw Normal View History

2001-08-17 05:46:24 +00:00
#!/bin/sh
#
# $Id$
2001-08-17 05:46:24 +00:00
#
2004-06-01 19:33:28 +00:00
# MBSE BBS Maintenance - Should be run from user 'mbse' crontab.
2001-08-17 05:46:24 +00:00
if [ -z "$MBSE_ROOT" ]; then
export MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
fi
2004-06-01 19:33:28 +00:00
if [ "`id -un`" != "mbse" ] ; then
echo "Must be run by user 'mbse'"
exit 1
fi
2001-08-17 05:46:24 +00:00
# Don't do maintenance if running on UPS battery power.
#
if [ -f $MBSE_ROOT/sema/upsalarm ]; then
exit 0
fi
$MBSE_ROOT/bin/mbuser pack kill 180 50 -quiet
$MBSE_ROOT/bin/mbmsg kill pack link -quiet
$MBSE_ROOT/bin/mbfile kill pack index -quiet
2001-08-17 05:46:24 +00:00
$MBSE_ROOT/bin/mbaff announce filefind -quiet
cd $MBSE_ROOT/tmp
$MBSE_ROOT/bin/mball list -zip -quiet
2001-08-17 05:46:24 +00:00