proxmox-quorum-manipulation/who-needs-a-majority

29 lines
379 B
Plaintext
Raw Normal View History

2021-01-27 23:24:15 +01:00
#!/bin/bash
lastcond="0"
while [ true ]
do
echo "$lastping"
# Edit this setting to your server ip
ping -c 1 192.168.178.10
lastping="$?"
if [ "$lastcond" != "$lastping" ]
then
if [ $lastping = 0 ]
then
pvecm expected 2
lastcond="0"
else
pvecm expected 1
lastcond="1"
fi
fi
echo "$lastping"
echo "$lastcond"
sleep 15
done