jsproxy/upload.sh

23 lines
407 B
Bash
Raw Normal View History

2019-04-29 09:49:16 +00:00
#!/usr/bin/env bash
# 功能:同步文件到所有节点,并重启服务
2019-04-23 04:14:27 +00:00
HOST=etherdream.com
NODE=(
2019-05-20 13:11:51 +00:00
node-aliyun-hk-0
node-aliyun-hk-1
2019-04-23 04:14:27 +00:00
node-aliyun-sg
)
for v in ${NODE[@]}; do
echo "$v upload ..."
rsync . jsproxy@$v.$HOST:server \
2019-05-02 07:10:10 +00:00
-a \
2019-04-23 04:14:27 +00:00
--exclude='nginx/cache/*' \
--exclude='nginx/logs/*'
echo "$v restart ..."
ssh jsproxy@$v.$HOST "./server/run.sh reload"
done
echo "done"