#!/bin/sh

#program name
if [ `whoami` != "root" ] ; then
        echo "Permission denied!"
    exit
fi

. /etc/rc.d/init.d/functions

procName=omcMain

pid=`status $procName`
#pid=`pidof omcMain`
echo $pid

if [ "$pid" == "omcMain is stopped" ]; then
    echo "restart..."
    wxc2dm=`/usr/local/omc/bin/wxc2_omcd restart`
else
    echo "existing..."
fi


