mirror of
https://github.com/EtherDream/jsproxy
synced 2024-11-22 01:49:01 +00:00
23 lines
401 B
Bash
Executable File
23 lines
401 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 功能:同步文件到所有节点,并重启服务
|
|
|
|
HOST=etherdream.com
|
|
NODE=(
|
|
node-aliyun-hk
|
|
node-aliyun-sg
|
|
node-bwh-los
|
|
)
|
|
for v in ${NODE[@]}; do
|
|
echo "$v upload ..."
|
|
|
|
rsync . jsproxy@$v.$HOST:server \
|
|
-a \
|
|
--exclude='nginx/cache/*' \
|
|
--exclude='nginx/logs/*'
|
|
|
|
echo "$v restart ..."
|
|
|
|
ssh jsproxy@$v.$HOST "./server/run.sh reload"
|
|
done
|
|
|
|
echo "done" |