File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -229,13 +229,24 @@ add_web_config() {
229229 chown root:$user $conf
230230 chmod 640 $conf
231231
232- if [ " $1 " != ' nginx ' ]; then
233- rm -f /etc/$1 /conf.d/domains/$domain .conf
234- ln -s $HOMEDIR / $user / conf/web/ $domain / $1 .conf /etc/$1 /conf.d/domains/$domain .conf
232+ if [[ " $2 " =~ stpl$ ] ]; then
233+ rm -f /etc/$1 /conf.d/domains/$domain .ssl. conf
234+ echo " include $ conf; " > /etc/$1 /conf.d/domains/$domain .ssl .conf
235235
236+ # Clear old configurations
237+ rm -fr $HOMEDIR /$user /conf/web/$domain .*
238+ rm -fr $HOMEDIR /$user /conf/web/ssl.$domain .*
239+ rm -fr $HOMEDIR /$user /conf/web/* nginx.$domain .*
236240 else
237241 rm -f /etc/$1 /conf.d/domains/$domain .conf
238- ln -s $HOMEDIR /$user /conf/web/$domain /$1 .conf /etc/$1 /conf.d/domains/$domain .conf
242+ echo " include $conf ;" > /etc/$1 /conf.d/domains/$domain .conf
243+
244+ # Clear old configurations
245+ rm -fr $HOMEDIR /$user /conf/web/$domain .*
246+ fi
247+
248+ if [ " $1 " != ' nginx' ]; then
249+ find /etc/$1 /conf.d/domains -type f -name " $domain .*" | xargs sed -i " s/;//g"
239250 fi
240251
241252 trigger=" ${2/ .* pl/ .sh} "
You can’t perform that action at this time.
0 commit comments