nginx-configurator/new_service.sh

10 lines
258 B
Bash
Raw Normal View History

2023-10-26 15:55:27 +02:00
#!/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