File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,15 @@ add_web_config() {
193193 domain_idn=$domain
194194 format_domain_idn
195195
196- cat $WEBTPL /$1 /$WEB_BACKEND /$2 | \
196+ WEBTPL_LOCATION=" $WEBTPL /$1 "
197+ if [ ! -z " $WEB_BACKEND " ] && [ -d " $WEBTPL_LOCATION /$WEB_BACKEND " ]; then
198+ if [ -f " $WEBTPL_LOCATION /$WEB_BACKEND /$2 " ]; then
199+ # check for backend specific template
200+ WEBTPL_LOCATION=" $WEBTPL /$1 /$WEB_BACKEND "
201+ fi
202+ fi
203+
204+ cat " ${WEBTPL_LOCATION} /$2 " | \
197205 sed -e " s|%ip%|$local_ip |g" \
198206 -e " s|%domain%|$domain |g" \
199207 -e " s|%domain_idn%|$domain_idn |g" \
@@ -270,8 +278,8 @@ add_web_config() {
270278 fi
271279
272280 trigger=" ${2/ .* pl/ .sh} "
273- if [ -x " $WEBTPL / $1 / $WEB_BACKEND /$trigger " ]; then
274- $WEBTPL / $1 / $WEB_BACKEND /$trigger \
281+ if [ -x " ${WEBTPL_LOCATION} /$trigger " ]; then
282+ $WEBTPL_LOCATION /$trigger \
275283 $user $domain $local_ip $HOMEDIR \
276284 $HOMEDIR /$user /web/$domain /public_html
277285 fi
You can’t perform that action at this time.
0 commit comments