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


if [ -f /dcsgbrf0/logiciel/netscape/suitespot/https-dcsgbrf0-tdf/LOCK ]
then 
    echo "Enterprise Server TDF :"
    if [ `ps -aef|grep https-dcsgbrf0-tdf|grep -vc grep` -eq 2 ]
    then
        echo "ok process https"
    else
        echo "KO process https"
    fi
    echo
fi


if [ -f /dcsgbrf0/logiciel/netscape/suitespot/https-dcsgbrf0-tdfauto/LOCK ]
then 
    echo "Enterprise Server TDFAUTO :"
    if [ `ps -aef|grep https-dcsgbrf0-tdfauto|grep -vc grep` -eq 2 ]
    then
        echo "ok process https"
    else
        echo "KO process https"
    fi
    echo
fi


if [ -f /dcsgbrf0/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 /dcsgbrf0/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 /dcsgbrf0/logiciel/netscape/suitespot/slapd-dcsgbrf0/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 /dcsgbrf0/logiciel/netscape/ns-home/proxy-dcsgbrf0-proxy/LOCK ]
then 
    echo "Proxy Server :"
    if [ `ps -aef|grep ns-proxy|grep -vc grep` -ge 2 ]
    then
        echo "ok process ns-proxy"
    else
        echo "KO process ns-proxy"
    fi
    echo
fi

if [ -f /dcsgbrf0/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 /dcsgbrf0/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
