zjcqoo 6 лет назад
Родитель
Сommit
294fe514de
3 измененных файлов с 30 добавлено и 0 удалено
  1. 3 0
      cert/.gitignore
  2. 3 0
      cert/cert.conf
  3. 24 0
      upload.sh

+ 3 - 0
cert/.gitignore

@@ -0,0 +1,3 @@
+*
+!.gitignore
+!README.md

+ 3 - 0
cert/cert.conf

@@ -0,0 +1,3 @@
+listen                8443 ssl http2;
+ssl_certificate       cert/etherdream.com/ecc.cer;
+ssl_certificate_key   cert/etherdream.com/ecc.key;

+ 24 - 0
upload.sh

@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# 功能:同步文件到所有节点,并重启服务
+
+HOST=etherdream.com
+NODE=(
+  node-aliyun-hk-2
+  # node-aliyun-hk-0
+  # node-aliyun-hk-1
+  # node-aliyun-sg
+)
+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"