@@ -267,46 +267,10 @@ add_web_config() {
267267 if [[ " $2 " =~ stpl$ ]]; then
268268 rm -f /etc/$1 /conf.d/domains/$domain .ssl.conf
269269 ln -s $conf /etc/$1 /conf.d/domains/$domain .ssl.conf
270-
271- # Clear old configurations
272- rm -f $HOMEDIR /$user /conf/web/$domain .*
273- rm -f $HOMEDIR /$user /conf/web/ssl.$domain .*
274-
275- # Rename/Move extra SSL config files
276- for f in $( ls $HOMEDIR /$user /conf/web/* .$domain .conf* 2> /dev/null) ; do
277- if [[ $f =~ .* /s(nginx| apache2)\. $domain \. conf(.* ) ]]; then
278- ServerType=" ${BASH_REMATCH[1]} "
279- CustomConfigName=" ${BASH_REMATCH[2]} "
280- if [ " $CustomConfigName " = " _letsencrypt" ]; then
281- rm -f " $f "
282- continue
283- fi
284- mv " $f " " $HOMEDIR /$user /conf/web/$domain /$ServerType .ssl.conf_old$CustomConfigName "
285- fi
286- done
287270 else
288271 rm -f /etc/$1 /conf.d/domains/$domain .conf
289272 ln -s $conf /etc/$1 /conf.d/domains/$domain .conf
290-
291- # Clear old configurations
292- rm -rf $HOMEDIR /$user /conf/web/$domain .*
293-
294- # Rename/Move extra config files
295- for f in $( ls $HOMEDIR /$user /conf/web/* .$domain .conf* 2> /dev/null) ; do
296- if [[ $f =~ .* /(nginx| apache2)\. $domain \. conf(.* ) ]]; then
297- ServerType=" ${BASH_REMATCH[1]} "
298- CustomConfigName=" ${BASH_REMATCH[2]} "
299- if [ " $CustomConfigName " = " _letsencrypt" ]; then
300- rm -f " $f "
301- continue
302- fi
303- mv " $f " " $HOMEDIR /$user /conf/web/$domain /$ServerType .conf_old$CustomConfigName "
304- elif [[ $f =~ .* /forcessl\. (nginx| apache2)\. $domain \. conf ]]; then
305- ServerType=" ${BASH_REMATCH[1]} "
306- mv " $f " " $HOMEDIR /$user /conf/web/$domain /$ServerType .forcessl.conf"
307- fi
308- done
309- fi
273+ fi
310274
311275 trigger=" ${2/ .* pl/ .sh} "
312276 if [ -x " ${WEBTPL_LOCATION} /$trigger " ]; then
0 commit comments