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

24 lines
515 B
Plaintext
Raw Normal View History

2001-08-17 05:46:24 +00:00
#!/bin/sh
#
# MBSE BBS Monthly - Should be run at the first day of the month at 01:30
2001-08-17 05:46:24 +00:00
#
2002-02-04 15:18:06 +00:00
# $Id$
2001-08-17 05:46:24 +00:00
if [ "$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
# While the system is on UPS battery power, don't start maintenance
#
2004-09-14 20:37:57 +00:00
while [ -f $MBSE_ROOT/var/sema/upsalarm ]; do
2001-08-17 05:46:24 +00:00
sleep 60
done
# Check files database and download areas.
#
$MBSE_ROOT/bin/mbfile check index -quiet