Updated maintenance scripts
This commit is contained in:
@@ -3,13 +3,9 @@ $Id$
|
||||
|
||||
MBSE BBS Script files.
|
||||
|
||||
If you want to make any changes to the scripts, do it here and not in the
|
||||
~/etc and ~/bin directories. After making the changes do a 'make install'
|
||||
as root and the scripts are in place with the right permissions and owners.
|
||||
|
||||
Also, if you use a distribution which is not supported here and want to
|
||||
have it added, then send the file installinit.log found in this directory,
|
||||
If you use a distribution which is not supported here and want to have it
|
||||
added, then send the file installinit.log found in this directory,
|
||||
SETUP.log (if exists) from the mbse main directory and a possible written
|
||||
inew init script you may have written.
|
||||
new init script you may have written.
|
||||
|
||||
Michiel
|
||||
|
@@ -2,12 +2,16 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# MBSE BBS Maintenance - Should be run from cron.
|
||||
# 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/sema/upsalarm ]; then
|
||||
|
@@ -5,9 +5,13 @@
|
||||
# $Id$
|
||||
|
||||
if [ "$MBSE_ROOT" = "" ]; then
|
||||
export MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
|
||||
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
|
||||
|
@@ -7,6 +7,10 @@
|
||||
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
|
||||
#
|
||||
|
@@ -1,13 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# MBSE BBS Weekly - Should be run every week at sunday from cron at 00:05
|
||||
# MBSE BBS Weekly - Should be run every week at sunday from cron at 00:15
|
||||
#
|
||||
# $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
|
||||
|
Reference in New Issue
Block a user