1
0

Shell linting

This commit is contained in:
Nicolas Duchon 2020-05-11 15:43:07 +02:00
parent 6dd7bc45f5
commit 45df81962e
No known key found for this signature in database
GPG Key ID: EA3151C66A4D79E7

@ -104,7 +104,7 @@ function add_location_configuration {
function add_standalone_configuration {
local domain="${1:?}"
if grep -q $domain "/etc/nginx/conf.d/default.conf"; then
if grep -q "$domain" "/etc/nginx/conf.d/default.conf"; then
# If the domain is already present in nginx's conf, use the location configuration.
add_location_configuration "$domain"
else
@ -127,7 +127,7 @@ EOF
}
function remove_all_standalone_configurations {
local old_shopt_options=$(shopt -p) # Backup shopt options
local old_shopt_options; old_shopt_options=$(shopt -p) # Backup shopt options
shopt -s nullglob
for file in "/etc/nginx/conf.d/standalone-cert-"*".conf"; do
rm -f "$file"