letsencrypt.sh script error line 38

dkzr

Verified User
Joined
Oct 17, 2013
Messages
94
Location
The Netherlands
When I run ./letsencrypt.sh renew <domain> I get an error:

Code:
letsencrypt.sh: 38: [: http: unexpected operator

Apart from the error, the script seems to work fine.

I'm running Debian 8.9 and Let's Encrypt client: 1.0.18
 
Last edited:
The version 1.0.20 drops the similar error:

Code:
# /usr/local/directadmin/scripts/letsencrypt.sh request `hostname`
/usr/local/directadmin/scripts/letsencrypt.sh: 43: [: http: unexpected operator

Should be single equal sign for /bin/sh (it's bash style with ==) :

Code:
if [ "$(echo "$LICENSE_NEW" | cut -c1-4)" == "http" ]; then
        LICENSE=$LICENSE_NEW
fi
 
Back
Top