23 lines
399 B
Plaintext
23 lines
399 B
Plaintext
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
#running:0, stop:3
|
||
|
|
STATE=$(systemctl status oam_cluster.service)
|
||
|
|
|
||
|
|
if [ $STATE -ne 0 ]
|
||
|
|
then
|
||
|
|
systemctl restart oam_cluster
|
||
|
|
sleep 10
|
||
|
|
STATE=$(systemctl status oam_cluster.service)
|
||
|
|
if [ $STATE -ne 0 ]
|
||
|
|
then
|
||
|
|
killall keepalived
|
||
|
|
exit 1
|
||
|
|
else
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
else
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
|
||
|
|
#todo ,check consul_cluster, check influxdb
|