Quote:
Originally Posted by jim mcnamara
Code:
ps -ef | grep -q dhcpd
if [ $? -eq 0 ] ; then
echo "dhcpd running"
else
echo "dhcpd not running"
fi
with the above, there could be frequent chances where we do end up with process info that are not under specific user control.
ps -ef | grep <user> | grep -q dhcpd