generated from nhcarrigan/template
13 lines
484 B
Bash
13 lines
484 B
Bash
|
servers=("prod" "irc" "fedi" "matrix" "gitea")
|
||
|
|
||
|
for server in "${servers[@]}"
|
||
|
do
|
||
|
echo "Pushing $server"
|
||
|
server_ip=$(ssh -o IdentityAgent=~/.1password/agent.sock $server "hostname -I | cut -d' ' -f1")
|
||
|
echo "Server IP: $server_ip"
|
||
|
|
||
|
rsync --archive -e "ssh -o IdentityAgent=~/.1password/agent.sock" configs/$server.conf root@$server_ip:/etc/nginx/conf.d/server.conf
|
||
|
|
||
|
ssh -o IdentityAgent=~/.1password/agent.sock root@$server_ip "systemctl restart nginx"
|
||
|
done
|