ACME: Fix missing quotes in variable comparisons
The variables can be empty if not set in the UCI config. Reported-by: Petr Novák <petrn@me.com> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This commit is contained in:
parent
6d65505c26
commit
5ade8f3392
2 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=acme
|
PKG_NAME:=acme
|
||||||
PKG_VERSION:=2.7.9
|
PKG_VERSION:=2.7.9
|
||||||
PKG_RELEASE:=7
|
PKG_RELEASE:=8
|
||||||
PKG_LICENSE:=GPLv3
|
PKG_LICENSE:=GPLv3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
|
@ -129,7 +129,7 @@ post_checks()
|
||||||
iptables -D input_rule -p tcp --dport 80 -j ACCEPT -m comment --comment "ACME" 2>/dev/null
|
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
|
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
|
if [ -n "$UHTTPD_LISTEN_HTTP" ]; then
|
||||||
uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
|
uci set uhttpd.main.listen_http="$UHTTPD_LISTEN_HTTP"
|
||||||
UHTTPD_LISTEN_HTTP=
|
UHTTPD_LISTEN_HTTP=
|
||||||
|
@ -138,7 +138,7 @@ post_checks()
|
||||||
/etc/init.d/uhttpd reload
|
/etc/init.d/uhttpd reload
|
||||||
fi
|
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
|
NGINX_WEBSERVER=0
|
||||||
/etc/init.d/nginx restart
|
/etc/init.d/nginx restart
|
||||||
fi
|
fi
|
||||||
|
@ -204,7 +204,7 @@ issue_cert()
|
||||||
[ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1
|
[ -n "$webroot" ] || [ -n "$dns" ] || pre_checks "$main_domain" || return 1
|
||||||
|
|
||||||
log "Running ACME for $main_domain"
|
log "Running ACME for $main_domain"
|
||||||
|
|
||||||
handle_credentials() {
|
handle_credentials() {
|
||||||
local credential="$1"
|
local credential="$1"
|
||||||
eval export $credential
|
eval export $credential
|
||||||
|
|
Loading…
Reference in a new issue