summaryrefslogtreecommitdiff
path: root/net/acme
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-06-25 22:06:20 -0700
committerRosen Penev <rosenp@gmail.com>2021-06-25 22:09:19 -0700
commita9bb04058a7bc576815c0eef5faab1b0f9c32e4c (patch)
treea69fca1f6166d6c31417888ab69089ce687a5adc /net/acme
parentf6ef44044d1c6d5bf4643e1d175299c10a526410 (diff)
acme: run through shellcheck
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'net/acme')
-rw-r--r--net/acme/files/run.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/acme/files/run.sh b/net/acme/files/run.sh
index 744e13338..a42339daa 100644
--- a/net/acme/files/run.sh
+++ b/net/acme/files/run.sh
@@ -44,7 +44,7 @@ debug() {
get_listeners() {
local proto rq sq listen remote state program
- netstat -nptl 2> /dev/null | while read proto rq sq listen remote state program; do
+ netstat -nptl 2> /dev/null | while read -r proto rq sq listen remote state program; do
case "$proto#$listen#$program" in
tcp#*:80#[0-9]*/*) echo -n "${program%% *} " ;;
esac
@@ -52,7 +52,7 @@ get_listeners() {
}
run_acme() {
- debug "Running acme.sh as '$ACME $@'"
+ debug "Running acme.sh as '$ACME $*'"
$ACME "$@"
}
@@ -139,7 +139,7 @@ post_checks() {
iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2> /dev/null
ip6tables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2> /dev/null
- if [ -e /etc/init.d/uhttpd ] && ([ -n "$UHTTPD_LISTEN_HTTP" ] || [ "$UPDATE_UHTTPD" -eq 1 ]); then
+ if [ -e /etc/init.d/uhttpd ] && { [ -n "$UHTTPD_LISTEN_HTTP" ] || [ "$UPDATE_UHTTPD" -eq 1 ]; }; then
if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
UHTTPD_LISTEN_HTTP=
@@ -148,7 +148,7 @@ post_checks() {
/etc/init.d/uhttpd reload
fi
- if [ -e /etc/init.d/nginx ] && ([ "$NGINX_WEBSERVER" -eq 1 ] || [ "$UPDATE_NGINX" -eq 1 ]); then
+ if [ -e /etc/init.d/nginx ] && { [ "$NGINX_WEBSERVER" -eq 1 ] || [ "$UPDATE_NGINX" -eq 1 ]; }; then
NGINX_WEBSERVER=0
/etc/init.d/nginx restart
fi
@@ -235,7 +235,7 @@ issue_cert() {
[ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1
fi
- if echo $keylength | grep -q "^ec-"; then
+ if echo "$keylength" | grep -q "^ec-"; then
domain_dir="$STATE_DIR/${main_domain}_ecc"
keylength_ecc=1
else