#!/usr/bin/ksh
# ESODcsUkProcShow
# Surveillance des process Netscape DCS UK
# systeme : solaris 2.5.1
#
# 02/04/98	ISD-12153/H. Baylou
#
if [ -f /logiciel/netscape/suitespot/https-dcscc2c0/LOCK ]
then 
    echo "Enterprise Server :"
    if [ `ps -aef|grep https-dcscc2c0|grep -vc grep` -eq 2 ]
    then
        echo "ok process https"
    else
        echo "KO process https"
    fi
    echo
fi


if [ -f /logiciel/netscape/suitespot/bin/mail/LOCK ]
then 
    echo "Mail Server :"
    if [ `ps -aef|grep NscpMail|grep -vc grep` -eq 1 ]
    then
        echo "ok process NscpMail"
    else
        echo "KO process NscpMail"
    fi
    echo
fi


if [ -f /logiciel/netscape/suitespot/bin/mail/LOCK ]
then 
    echo "Mail Server IMAP4 :"
    if [ `ps -aef|grep SIMAP4-Server|grep -vc grep` -ge 1 ]
    then
        echo "ok process SIMAP4-Server"
    else
        echo "KO process SIMAP4-Server"
    fi
    echo
fi


if [ -f /logiciel/netscape/suitespot/slapd-dcscc2c0/LOCK ]
then 
    echo "Directory Server :"
    if [ `ps -aef|grep ns-slapd|grep -vc grep` -eq 1 ]
    then
        echo "ok process ns-slapd"
    else
        echo "KO process ns-slapd"
    fi
    echo
fi


if [ -f /logiciel/netscape/ns-home/LOCK ]
then 
    echo "Suitespot 2 :"
    if [ `ps -aef|grep ns-admin| grep ns-home |grep -vc grep` -eq 2 ]
    then
        echo "ok process ns-admin"
    else
        echo "KO process ns-admin"
    fi
    echo
fi

if [ -f /logiciel/netscape/suitespot/LOCK ]
then 
    echo "Suitespot 3 :"
    if [ `ps -aef|grep ns-admin| grep suitespot |grep -vc grep` -eq 1 ]
    then
        echo "ok process ns-admin"
    else
        echo "KO process ns-admin"
    fi
    echo
fi
