Pārlūkot izejas kodu

Merge pull request #1690 from chkhanu/fix-invalid-extension-replace

Fix invalid extension replace in add_web_config
Serghey Rodin 6 gadi atpakaļ
vecāks
revīzija
7726ed8956
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      func/domain.sh

+ 5 - 1
func/domain.sh

@@ -215,7 +215,11 @@ add_web_config() {
         fi
     fi
 
-    trigger="${2/.*pl/.sh}"
+    trigger="${2/%.tpl/.sh}"
+    if [[ "$2" =~ stpl$ ]]; then
+        trigger="${2/%.stpl/.sh}"
+    fi
+
     if [ -x "$WEBTPL/$1/$WEB_BACKEND/$trigger" ]; then
         $WEBTPL/$1/$WEB_BACKEND/$trigger \
             $user $domain $local_ip $HOMEDIR \