Преглед изворни кода

Add %proxy_ssl_port% variable + add upgrade script

Jaap Marcus пре 5 година
родитељ
комит
24df384e37
2 измењених фајлова са 15 додато и 0 уклоњено
  1. 1 0
      bin/v-add-sys-ip
  2. 14 0
      install/upgrade/versions/1.3.0.sh

+ 1 - 0
bin/v-add-sys-ip

@@ -147,6 +147,7 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
         sed -e "s/%ip%/$ip/g" \
             -e "s/%web_port%/$WEB_PORT/g" \
             -e "s/%proxy_port%/$PROXY_PORT/g" \
+            -e "s/%proxy_ssl_port%/$PROXY_SSL_PORT/g" \
         > /etc/$PROXY_SYSTEM/conf.d/$ip.conf
 
     # mod_extract_forwarded

+ 14 - 0
install/upgrade/versions/1.3.0.sh

@@ -5,3 +5,17 @@
 #######################################################################################
 #######                      Place additional commands below.                   #######
 #######################################################################################
+
+# Add default SSL Certificate config when ip is visisted
+if [ "$PROXY_SYSTEM" = "nginx" ]; then
+    echo "[ ! ] Update IP.conf"
+    while read IP; do
+        rm /etc/nginx/conf.d/$IP.conf
+        cat $WEBTPL/$PROXY_SYSTEM/proxy_ip.tpl |\
+        sed -e "s/%ip%/$IP/g" \
+            -e "s/%web_port%/$WEB_PORT/g" \
+            -e "s/%proxy_port%/$PROXY_PORT/g" \
+            -e "s/%proxy_ssl_port%/$PROXY_SSL_PORT/g" \
+        > /etc/$PROXY_SYSTEM/conf.d/$IP.conf
+    done < <(ls $HESTIA/data/ips/)
+fi