Skip to content

Commit 5f65ff8

Browse files
authored
Merge pull request hestiacp#1940 from jaapmarcus/fix/1939-error-default-templates-missing
Fix 2 small bug
2 parents 9e6cfa2 + d8bf812 commit 5f65ff8

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ All notable changes to this project will be documented in this file.
1313
- Fix PHP bug in /list/log/
1414
- Fix issue with time in /list/services as it was showing as 50 minute1 instead of minutes
1515
- Add missing back buttons + fix behavoir of back buttons on login page.
16+
- Set "default" when WEB_TEMPLATE and PROXY_TEMPLATE is missing in user.conf
17+
- Add BACKEND_TEMPLATE to default package
1618

1719
## [1.4.3] - Service release
1820

bin/v-add-web-domain

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ fi
169169
# Preparing domain variables
170170
prepare_web_domain_values
171171

172+
if [ -z "$WEB_TEMPLATE" ]; then
173+
WEB_TEMPLATE='default'
174+
update_user_value "$user" '$WEB_TEMPLATE' "default"
175+
fi
176+
172177
# Adding web server config
173178
add_web_config "$WEB_SYSTEM" "$WEB_TEMPLATE.tpl"
174179

@@ -180,7 +185,12 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
180185
PROXY_EXT="$PROXY_EXT,exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp"
181186
PROXY_EXT="$PROXY_EXT,rtf,js,mp3,avi,mpeg,flv,html,htm"
182187
fi
183-
add_web_config "$PROXY_SYSTEM" "$PROXY_TEMPLATE.tpl"
188+
if [ -z "$PROXY_TEMPLATE" ]; then
189+
PROXY_TEMPLATE='default'
190+
update_user_value "$user" '$PROXY_TEMPLATE' "default"
191+
fi
192+
193+
add_web_config "$PROXY_SYSTEM" "$PROXY_TEMPLATE.tpl"
184194
fi
185195

186196

bin/v-delete-web-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fi
9090
sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf
9191

9292
# Deleting proxy
93-
if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
93+
if [ ! -z "$PROXY_SYSTEM" ]; then
9494
del_web_config "$PROXY_SYSTEM" "$PROXY.tpl"
9595
if [ "$SSL" = 'yes' ]; then
9696
del_web_config "$PROXY_SYSTEM" "$PROXY.stpl"

install/deb/packages/default.pkg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
WEB_TEMPLATE='default'
22
PROXY_TEMPLATE='default'
3+
BACKEND_TEMPLATE='default'
34
DNS_TEMPLATE='default'
45
WEB_DOMAINS='unlimited'
56
WEB_ALIASES='unlimited'

0 commit comments

Comments
 (0)