#!/bin/sh ############################################# # SLOW.RUN # A script that runs the milte in the # foreground, for as long as the # semaphore file exists. In the event # that the milter dies unexpectly, # it is automatically restarted. # # This script is called from slow.init. If # slow.init is run by root, be sure to set # up ${MILTERRUNAS} so that the actual milter # is not run by root. ############################################# while [ -f ${MILTERDIR}/${MILTERSEMAPHORE} ] do ${MILTERRUNAS} ${MILTERDIR}/${MILTER} ${MILTERARGS} sleep $MILTERSLEEP if [ -f ${MILTERDIR}/${MILTERSEMAPHORE} ]; then logger -p mail.alert -t ${MILTER} "died and was restarted"; fi done exit 0