Last active
October 20, 2020 10:10
-
-
Save nampdn/7cd9dd52b6bc62b5c0d8241bf221c55b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
declare -a IPS=(10.131.79.220 10.131.78.219) | |
for ip in ${IPS[@]}; do | |
echo "Syncing to server: $ip" | |
rsync -avz /etc/nginx/sites-available/lb* root@${ip}:/etc/nginx/sites-available/ | |
ssh root@${ip} sudo ln -s /etc/nginx/sites-available/lb* /etc/nginx/sites-enabled/ | |
ssh root@${ip} sudo service nginx reload | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment