9 lines
154 B
Text
9 lines
154 B
Text
|
#!/bin/bash
|
||
|
|
||
|
state=$(nc 127.0.0.1 5400)
|
||
|
|
||
|
if [[ "$state" != "MASTER" ]]; then
|
||
|
/usr/local/sbin/pg_backup -c /etc/postgresql/9.6/main/pg_backup.config
|
||
|
fi
|
||
|
|