jsproxy/upload.sh
2019-05-02 15:10:10 +08:00

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"