10 lines
No EOL
258 B
Bash
10 lines
No EOL
258 B
Bash
#!/bin/bash
|
|
|
|
kill -s $(keepalived --signum=DATA) $(cat /var/run/keepalived.pid)
|
|
STATE=$(cat /tmp/keepalived.data |grep MASTER)
|
|
|
|
if [[ -z "${STATE}" ]]; then
|
|
echo "This is a secondary backup server, run the script on current master"
|
|
else
|
|
python3 n_gen.py
|
|
fi |