54 lines
1.4 KiB
Bash
Executable File
54 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# this scripts upadte all servers located in hetenzer
|
|
|
|
# update main uplink
|
|
rm -rf uplink.urmic.org
|
|
git clone https://devdatt:$1@git.dbhatt.org/serverwa/uplink.urmic.org.git
|
|
cd uplink.urmic.org
|
|
cp nginx.conf /etc/nginx/
|
|
systemctl reload nginx
|
|
|
|
|
|
# update streamer.urmic.org
|
|
STREAMER_URMIC_ORG=$(cat <<EOF
|
|
rm -rf streamer.urmic.org
|
|
echo "Pulling latest changes from remote Git..."
|
|
git clone https://devdatt:$1@git.dbhatt.org/serverwa/streamer.urmic.org.git
|
|
cd streamer.urmic.org
|
|
cp icecast.xml /etc/icecast2/
|
|
systemctl reload icecast2
|
|
EOF
|
|
)
|
|
ssh -i id_rsa -o StrictHostKeyChecking=no root@$ip "$STREAMER_URMIC_ORG"
|
|
|
|
|
|
# update channels.urmic.org
|
|
channel_rtmp_ips=("172.16.99.181" "172.16.99.182" "172.16.99.183" "172.16.99.184" "172.16.99.185" "172.16.99.186" "172.16.99.187")
|
|
|
|
CHANNEL_URMIC_ORG=$(cat <<EOF
|
|
rm -rf channel.urmic.org
|
|
echo "Pulling latest changes from remote Git..."
|
|
git clone https://devdatt:$1@git.dbhatt.org/serverwa/channel.urmic.org.git
|
|
cd channel.urmic.org
|
|
cp nginx.conf /etc/nginx/
|
|
systemctl reload nginx
|
|
EOF
|
|
)
|
|
|
|
for ip in "${channel_rtmp_ips[@]}"; do
|
|
ssh -i id_rsa -o StrictHostKeyChecking=no root@$ip "$CHANNEL_URMIC_ORG"
|
|
echo "Current ip: $ip"
|
|
done
|
|
|
|
# x86 cdn ips
|
|
x86_cdn_ips=("172.16.99.181" "172.16.99.182" "172.16.99.183")
|
|
DD_URMIC_ORG=$(cat <<EOF
|
|
|
|
EOF
|
|
)
|
|
|
|
for ip in "${x86_cdn_ips[@]}"; do
|
|
ssh -i id_rsa -o StrictHostKeyChecking=no root@$ip "$CHANNEL_URMIC_ORG"
|
|
echo "Current ip: $ip"
|
|
done
|