11 lines
249 B
Bash
11 lines
249 B
Bash
#!/bin/bash
|
|
|
|
COUNT=`ps -C haproxy --no-header |wc -l`
|
|
if [ $COUNT -eq 0 ];then
|
|
/usr/local/haproxy/sbin/haproxy -f /etc/haproxy/haproxy.cfg
|
|
sleep 2
|
|
if [ `ps -C haproxy --no-header |wc -l` -eq 0 ];then
|
|
killall keepalived
|
|
fi
|
|
fi
|