1:Check ports
#!/bin/bash
set - e
set - x
if (netstat -nltp |grep 1935) == 0
then echo "SRS Oringin start failed" >> /tmp/failed_start_service.log
else echo "SRS Oringin start"
2:Check process name
#/bin/bash
if ps aux |grep admin/|grep conf >/dev/null
then
echo -e "\033[33m admin started \033[0m"
else
echo -e "\033[41m Service admin start failed \033[0m"
fi