[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Sendmail has died



On Mon, 2006-09-25 at 12:52 -0600, Frank Cox wrote:
> On Mon, 25 Sep 2006 14:47:15 -0400 (EDT)
> William Hooper <whooperhsd3 earthlink net> wrote:
> 
> > > I know darn well that it wasn't running before, until I
> > > deleted /var/lock/subsys/sendmail.
> > 
> > Are you sure?  Your first post also said "Permission denied".
> 
> I'm sure.  The reason why I was looking into it in the first place was because
> I suddenly stopped getting email from some cron jobs that are supposed to
> report successful completion and whatnot.
> 
> -- 
> MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
> 

It might help if you step through the function that is called
by /sbin/service status foo, first as an unpriviledged user and then as
root. What does ps aux say?

Has your /etc/aliases file been modified? If your cron jobs are running
as root this may cause them to go awol.

/etc/init.d/functions:status()

status() {
        local base pid pid_file=

        # Test syntax.
        if [ "$#" = 0 ] ; then
                echo $"Usage: status [-p pidfile] {program}"
                return 1
        fi
        if [ "$1" = "-p" ]; then
                pid_file=$2
                shift 2
        fi
        base=${1##*/}

        # First try "pidof"
        pid="$(__pids_pidof "$1")"
        if [ -n "$pid" ]; then
                echo $"${base} (pid $pid) is running..."
                return 0
        fi

        # Next try "/var/run/*.pid" files
        [ -z "$pid_file" ] && pid_file=/var/run/${base}.pid
        if [ -f "$pid_file" ] ; then
                read pid < "$pid_file"
                if [ -n "$pid" ]; then
                        echo $"${base} dead but pid file exists"
                        return 1
                fi
        fi
        # See if /var/lock/subsys/${base} exists
        if [ -f /var/lock/subsys/${base} ]; then
                echo $"${base} dead but subsys locked"
                return 2
        fi
        echo $"${base} is stopped"
        return 3
}

Cheers,

Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]