Przeglądaj źródła

added template trigger for nginx templates

Serghey Rodin 12 lat temu
rodzic
commit
ca85e44d2a

+ 5 - 0
bin/v-add-web-domain-proxy

@@ -86,6 +86,11 @@ if [ "$SSL" = 'yes' ]; then
     fi
 fi
 
+# Running template trigger
+if [ -x $WEBTPL/$PROXY_SYSTEM/$template.sh ]; then
+    $WEBTPL/$PROXY_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot
+fi
+
 
 #----------------------------------------------------------#
 #                       Vesta                              #

+ 5 - 0
bin/v-change-web-domain-proxy-tpl

@@ -75,6 +75,11 @@ if [ "$SSL" = 'yes' ]; then
     chmod 640 $conf
 fi
 
+# Running template trigger
+if [ -x $WEBTPL/$PROXY_SYSTEM/$template.sh ]; then
+    $WEBTPL/$PROXY_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot
+fi
+
 
 #----------------------------------------------------------#
 #                       Vesta                              #

+ 5 - 0
func/rebuild.sh

@@ -303,6 +303,11 @@ rebuild_web_domain_conf() {
     fi
     user_domains=$((user_domains + 1))
 
+    # Running template trigger
+    if [ -x $WEBTPL/$PROXY_SYSTEM/$PROXY.sh ]; then
+        $WEBTPL/$PROXY_SYSTEM/$PROXY.sh $user $domain $ip $HOMEDIR $docroot
+    fi
+
     # Checking ftp
     if [ ! -z "$FTP_USER" ]; then
         if [ -z "$(grep ^$FTP_USER: /etc/passwd)" ]; then