16 lines
520 B
Bash
16 lines
520 B
Bash
#update cdn.urmic.org
|
|
cdn_ips=("172.16.99.182" "172.16.99.183" "172.16.99.184" "172.16.99.185" "172.16.99.186" "172.16.99.187")
|
|
CDN_PHP=$(cat <<EOF
|
|
rm -rf ott_x64_json
|
|
rm -rf /var/www/cdn.urmic.org/*
|
|
echo "Pulling latest changes from remote Git..."
|
|
git clone https://devdatt:$1@git.dbhatt.org/serverwa/ott_x64_json.git
|
|
cd ott_x64_json
|
|
cp -r * /var/www/cdn.urmic.org/
|
|
rm -rf ott_x64_json
|
|
EOF
|
|
)
|
|
for ip in "${cdn_ips[@]}"; do
|
|
ssh -i id_rsa -o StrictHostKeyChecking=no root@$ip "$CDN_PHP"
|
|
echo "Current ip: $ip"
|
|
done |