mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
setup-certbot: Fix shellcheck warnings.
In scripts/setup/setup-certbot line 64:
if [ -z "$DOMAIN" -o -z "$EMAIL" ]; then
^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
In scripts/setup/setup-certbot line 73:
method_args=(--webroot --webroot-path=/var/lib/zulip/certbot-webroot/)
^-- SC2191: The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it.
In scripts/setup/setup-certbot line 112:
if [ -z "$deploy_hook" ]; then
^-- SC2128: Expanding an array without an index only gives the first element.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Tim Abbott
parent
e495eaa339
commit
5a5497c6a1
@@ -61,7 +61,7 @@ if [ -n "$show_help" ]; then
|
|||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DOMAIN" -o -z "$EMAIL" ]; then
|
if [ -z "$DOMAIN" ] || [ -z "$EMAIL" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ case "$method" in
|
|||||||
method_args=(--standalone)
|
method_args=(--standalone)
|
||||||
;;
|
;;
|
||||||
webroot)
|
webroot)
|
||||||
method_args=(--webroot --webroot-path=/var/lib/zulip/certbot-webroot/)
|
method_args=(--webroot '--webroot-path=/var/lib/zulip/certbot-webroot/')
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
@@ -109,7 +109,7 @@ symlink_with_backup() {
|
|||||||
ln -nsf "$1" "$2"
|
ln -nsf "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$deploy_hook" ]; then
|
if [ ${#deploy_hook} -eq 0 ]; then
|
||||||
# If no deploy hook was specified, assume we're deploying to the default
|
# If no deploy hook was specified, assume we're deploying to the default
|
||||||
# location Zulip wants.
|
# location Zulip wants.
|
||||||
CERT_DIR=/etc/letsencrypt/live/"$DOMAIN"
|
CERT_DIR=/etc/letsencrypt/live/"$DOMAIN"
|
||||||
|
|||||||
Reference in New Issue
Block a user