nginx-configurator/new_service.sh
2023-10-26 15:55:27 +02:00

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