#!/bin/bash
pidof httpd
if [ $? -eq 0 ];then
echo "httpd is ok"
else
echo "httpd is not ok"
/etc/init.d/httpd start
fi
pidof keepalived
if [ $? -eq 0 ];then
echo "keepalived is ok"
else
echo "keepalived is not ok"
systemctl start keepalived
fi