Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2874 → Rev 2870

/alcasar.sh
2078,15 → 2078,20
letsencrypt()
{
echo "Installing Let's Encrypt client..."
 
# Remove potential old installers
rm -rf /tmp/acme.sh-*
 
# Extract acme.sh
tar xzf ./conf/letsencrypt-client/acme.sh-*.tar.gz -C /tmp/
 
pwdInstall=$(pwd)
cd /tmp/acme.sh-* || { echo "Unable to find ACME directory"; exit 1; }
 
acmesh_installDir="/opt/acme.sh"
acmesh_confDir="/usr/local/etc/letsencrypt"
acmesh_userAgent="ALCASAR"
 
# Install acme.sh
./acme.sh --install \
--home $acmesh_installDir \
2097,9 → 2102,11
--useragent $acmesh_userAgent \
--nocron \
> /dev/null
 
if [ $? -ne 0 ]; then
echo "Error during installation of Let's Encrypt client (acme.sh)."
fi
 
# Create configuration file
cat <<EOF > /usr/local/etc/alcasar-letsencrypt
email=
2110,8 → 2117,10
dnsapi=
dateNextRenewal=
EOF
 
cd $pwdInstall || { echo "Unable to find $pwdInstall directory"; exit 1; }
rm -rf /tmp/acme.sh-*
 
} # End of letsencrypt()
 
##################################################################