Skip to content

Commit 32d7340

Browse files
authored
v3.3.7 (#86)
Minor updates * Don't delete custom nginx configuration directory unless force is enabled
1 parent 82bebe7 commit 32d7340

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.6
1+
3.3.7

overlay/usr/bin/bf/nginx-regenerate

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,31 @@ for CFG in "${NGINX_CONFIGS[@]}" ; do
5353
STRIPPED=${NAME::-2}
5454
bf-debug " .. ${STRIPPED}"
5555

56-
# unless the force switch is enabled, if the domain has custom config, don't delete
57-
if [[ "${FORCE-}" = "1" ]] || [[ -z "${NGXCONF[${STRIPPED}]-}" ]] ; then
58-
bf-debug " .. standard config or force enabled: remove"
59-
rm -rf ${PROXY_SITES}/${STRIPPED}*
56+
# the domain has standard config - delete conf file
57+
if [[ -z "${NGXCONF[${STRIPPED}]-}" ]] ; then
58+
59+
bf-debug " .. standard config: remove configuration file"
60+
rm -f ${PROXY_SITES}/${STRIPPED}.conf
61+
62+
# the domain has custom config but force is enabled - delete conf file
63+
elif [[ "${FORCE-}" = "1" ]] ; then
64+
65+
bf-debug " .. custom config with force enabled: remove configuration file"
66+
rm -f ${PROXY_SITES}/${STRIPPED}.conf
67+
68+
# the domain has custom config and force is not enabled - do nothing
6069
else
70+
6171
bf-debug " .. custom config and force not enabled: leave"
72+
73+
fi
74+
75+
# force is enabled - delete configuration directory
76+
if [[ "${FORCE-}" = "1" ]] ; then
77+
78+
bf-debug " .. force enabled: remove configuration directory"
79+
rm -rf ${PROXY_SITES}/${STRIPPED}.d
80+
6281
fi
6382

6483
done

0 commit comments

Comments
 (0)