I have been sent a simple monitoring script by the author of ASSP, but I am not sure how to fix the PROC= line that causes an error.
#!/bin/bash
# ASSP watchdog process.
#
# Start in the correct directory.
BASE=/usr/share/assp/
cd $BASE
# Check for a running ASSP process.
PROC=`ps -axvO ucomm | grep Schedule::Cron | grep perl | awk '{print $1}'`
FILES=`lsof -p "${PROC}" | grep /usr/share/assp | grep perl`
# If ASSP is not running, start it.
if [ "${FILES}" ]
then {
echo "ASSP is already running."
}
else {
echo "Restarting ASSP."
perl assp.pl
} fi
It gives the following error.
ERROR: Must set personality to get -x option.
I am not sure if this line is remotely close to working. I was thinking of a write script that simply checks if there is a perl assp.pl script active and if not, start it manually. This server runs Debian and has ASSP/Postfix installed.