#!/bin/sh
LOGFILE=/tmp/apache.log
SCRIPT_DIR=~/bin
logmsg () {
echo $(date): $1 >> $LOGFILE
}
while read instance
do
if [ -x “${SCRIPT_DIR}/$instance” ] ; then
logmsg “Recycle $instance…”
“${SCRIPT_DIR}/$instance” start >> $LOGFILE 2>&1
else
logmsg “Cannot find recycle script for $instance – not starting”
fi
done < “${SCRIPT_DIR}/active-servers”
logmsg “Start script execution complete”
Recent Comments