Skip to content

Commit 481ee7c

Browse files
author
Kristan Kenney
committed
Rebuild web configuration during suspension activities
1 parent f08af08 commit 481ee7c

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

bin/v-suspend-web-domain

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
7171
fi
7272
fi
7373

74+
# Rebuild global domain configuration
75+
$BIN/v-rebuild-web-domain $user $domain 'no'
7476

7577
#----------------------------------------------------------#
7678
# Hestia #

bin/v-unsuspend-web-domain

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
6969
fi
7070
fi
7171

72+
# Rebuild global domain configuration
73+
$BIN/v-rebuild-web-domain $user $domain 'no'
7274

7375
#----------------------------------------------------------#
7476
# Hestia #

func/domain.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,6 @@ replace_web_config() {
288288

289289
if [ -e "$conf" ]; then
290290
sed -i "s|$old|$new|g" $conf
291-
else
292-
# fallback to old style configs
293-
conf="$HOMEDIR/$user/conf/web/$1.conf"
294-
if [[ "$2" =~ stpl$ ]]; then
295-
conf="$HOMEDIR/$user/conf/web/s$1.conf"
296-
fi
297-
get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
298-
sed -i "$top_line,$bottom_line s|$old|$new|g" $conf
299291
fi
300292
}
301293

@@ -322,8 +314,7 @@ del_web_config() {
322314
if [[ "$2" =~ stpl$ ]]; then
323315
conf="$HOMEDIR/$user/conf/web/s$1.conf"
324316
fi
325-
get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf
326-
sed -i "$top_line,$bottom_line d" $conf
317+
rm -f $conf
327318

328319
# Remove old global includes file
329320
rm -f /etc/$1/conf.d/hestia.conf

0 commit comments

Comments
 (0)