Skip to content

Commit 5436adb

Browse files
author
Kristan Kenney
committed
Adjust structure of web domain configuration files
1 parent 92d7d12 commit 5436adb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

func/domain.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,24 +231,20 @@ add_web_config() {
231231

232232
if [[ "$2" =~ stpl$ ]]; then
233233
rm -f /etc/$1/conf.d/domains/$domain.ssl.conf
234-
echo "include $conf;" > /etc/$1/conf.d/domains/$domain.ssl.conf
234+
ln -s $conf /etc/$1/conf.d/domains/$domain.ssl.conf
235235

236236
# Clear old configurations
237237
rm -rf $HOMEDIR/$user/conf/web/$domain.*
238238
rm -rf $HOMEDIR/$user/conf/web/ssl.$domain.*
239239
rm -rf $HOMEDIR/$user/conf/web/*nginx.$domain.*
240240
else
241241
rm -f /etc/$1/conf.d/domains/$domain.conf
242-
echo "include $conf;" > /etc/$1/conf.d/domains/$domain.conf
242+
ln -s $conf /etc/$1/conf.d/domains/$domain.conf
243243

244244
# Clear old configurations
245245
rm -rf $HOMEDIR/$user/conf/web/$domain.*
246246
fi
247-
248-
if [ "$1" != 'nginx' ]; then
249-
find /etc/$1/conf.d/domains -type f -name "$domain.*" | xargs sed -i "s/;//g"
250-
fi
251-
247+
252248
trigger="${2/.*pl/.sh}"
253249
if [ -x "$WEBTPL/$1/$WEB_BACKEND/$trigger" ]; then
254250
$WEBTPL/$1/$WEB_BACKEND/$trigger \

0 commit comments

Comments
 (0)