I need use /etc/init.d/httpd status command to verify whether its running or not inside shell. I don't want to use pidof pgrep etc. --something like
retval=`/etc/init.d/httpd status`
if [ $retval -eq "running" ];then echo "yes" ; else echo "no";fi
Any thoughts ?