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/saved-mbsebbs-code-2/script/maint
vbcoen 6a6a253885 Updated mbmon.c & mbsetup.c
Added doc dir. and manual as .pdf
restored deleted files - yep I screwed the pooch.
2015-11-03 20:41:11 +00:00

29 lines
691 B
Bash

#!/bin/sh
#
# $Id: maint,v 1.5 2004/09/14 20:37:59 mbse Exp $
#
# MBSE BBS Maintenance - Should be run from user 'mbse' crontab.
if [ -z "$MBSE_ROOT" ]; then
export MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
fi
if [ "`id -un`" != "mbse" ] ; then
echo "Must be run by user 'mbse'"
exit 1
fi
# Don't do maintenance if running on UPS battery power.
#
if [ -f $MBSE_ROOT/var/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
$MBSE_ROOT/bin/mbaff announce filefind -quiet
cd $MBSE_ROOT/tmp
$MBSE_ROOT/bin/mball list -zip -quiet