Last active
October 16, 2023 18:32
-
-
Save Ne00n/f10ef4d50727852298c3e30db4a15cca to your computer and use it in GitHub Desktop.
basedflare sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#bash basesync.sh 1.1.1.1 8.8.8.8 | |
mkdir /tmp/basedflare | |
rsync -r root@$1:/etc/haproxy/ /tmp/basedflare/ | |
ssh root@$2 systemctl stop haproxy | |
ssh root@$2 systemctl stop dataplaneapi | |
rsync -r /tmp/basedflare/map root@$2:/etc/haproxy/ | |
rsync -r /tmp/basedflare/ssl root@$2:/etc/haproxy/ | |
ssh root@$2 systemctl stop dataplaneapi | |
ssh root@$2 systemctl start haproxy | |
rm -r /tmp/basedflare |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment