File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 1- 3.3.6
1+ 3.3.7
Original file line number Diff line number Diff 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
6483done
You can’t perform that action at this time.
0 commit comments