20 lines
419 B
Bash
20 lines
419 B
Bash
#!/bin/sh
|
|
#
|
|
# MBSE BBS Monthly - Should be run at the first of the month at 00:10
|
|
#
|
|
# $Id$
|
|
|
|
if [ "$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
|
|
|
|
# While the system is on UPS battery power, don't start maintenance
|
|
#
|
|
while [ -f $MBSE_ROOT/sema/upsalarm ]; do
|
|
sleep 60
|
|
done
|