mirror of
https://git.nolog.cz/NoLog.cz/nginx-configurator.git
synced 2025-01-31 11:53:35 +01:00
10 lines
258 B
Bash
10 lines
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
|