33 lines
1.0 KiB
Bash
33 lines
1.0 KiB
Bash
#update account.urmic.org
|
|
account_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")
|
|
ACCOUNT_PHP=$(cat <<EOF
|
|
rm -rf OttDemo4
|
|
rm -rf /var/www/account.urmic.org/*
|
|
echo "Pulling latest changes from remote Git..."
|
|
git clone https://devdatt:$1@git.dbhatt.org/devdatt/OttDemo4.git
|
|
cd OttDemo4
|
|
cp -r html/* /var/www/account.urmic.org/
|
|
rm -rf OttDemo4
|
|
EOF
|
|
)
|
|
for ip in "${account_ips[@]}"; do
|
|
ssh -i id_rsa -o StrictHostKeyChecking=no root@$ip "$ACCOUNT_PHP"
|
|
echo "Current ip: $ip"
|
|
done
|
|
|
|
#update account.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 |