Skip to content

Instantly share code, notes, and snippets.

@Ne00n
Last active October 16, 2023 18:32
Show Gist options
  • Save Ne00n/f10ef4d50727852298c3e30db4a15cca to your computer and use it in GitHub Desktop.
Save Ne00n/f10ef4d50727852298c3e30db4a15cca to your computer and use it in GitHub Desktop.
basedflare sync
#!/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