فهرست منبع

Merge pull request #1841 from jaapmarcus/fix/proxy-extentions

Leave proxy_extentions replacement in the system
Jaap Marcus 4 سال پیش
والد
کامیت
47cda0fc05
1فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 10 1
      func/domain.sh

+ 10 - 1
func/domain.sh

@@ -231,7 +231,11 @@ add_web_config() {
             WEBTPL_LOCATION="$WEBTPL/$1/$WEB_BACKEND"
             WEBTPL_LOCATION="$WEBTPL/$1/$WEB_BACKEND"
         fi
         fi
     fi
     fi
-
+    
+    # Note: Removing or renaming template variables will lead to broken custom templates.
+    #   -If possible custom templates should be automatically upgraded to use the new format
+    #   -Alternatively a depreciation period with proper notifications should be considered 
+    
     cat "${WEBTPL_LOCATION}/$2" | \
     cat "${WEBTPL_LOCATION}/$2" | \
         sed -e "s|%ip%|$local_ip|g" \
         sed -e "s|%ip%|$local_ip|g" \
             -e "s|%domain%|$domain|g" \
             -e "s|%domain%|$domain|g" \
@@ -248,6 +252,7 @@ add_web_config() {
             -e "s|%proxy_system%|$PROXY_SYSTEM|g" \
             -e "s|%proxy_system%|$PROXY_SYSTEM|g" \
             -e "s|%proxy_port%|$PROXY_PORT|g" \
             -e "s|%proxy_port%|$PROXY_PORT|g" \
             -e "s|%proxy_ssl_port%|$PROXY_SSL_PORT|g" \
             -e "s|%proxy_ssl_port%|$PROXY_SSL_PORT|g" \
+            -e "s/%proxy_extentions%/${PROXY_EXT//,/|}/g" \
             -e "s/%proxy_extensions%/${PROXY_EXT//,/|}/g" \
             -e "s/%proxy_extensions%/${PROXY_EXT//,/|}/g" \
             -e "s|%user%|$user|g" \
             -e "s|%user%|$user|g" \
             -e "s|%group%|$user|g" \
             -e "s|%group%|$user|g" \
@@ -739,6 +744,10 @@ add_webmail_config() {
         
         
     fi
     fi
     
     
+    # Note: Removing or renaming template variables will lead to broken custom templates.
+    #   -If possible custom templates should be automatically upgraded to use the new format
+    #   -Alternatively a depreciation period with proper notifications should be considered 
+    
     cat $MAILTPL/$1/$2 | \
     cat $MAILTPL/$1/$2 | \
         sed -e "s|%ip%|$local_ip|g" \
         sed -e "s|%ip%|$local_ip|g" \
             -e "s|%domain%|$WEBMAIL_ALIAS.$domain|g" \
             -e "s|%domain%|$WEBMAIL_ALIAS.$domain|g" \