mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
check letsencrypt is on
This commit is contained in:
@@ -157,6 +157,12 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
|
|
||||||
elif [ "$1" = "issue-cert" ]; then
|
elif [ "$1" = "issue-cert" ]; then
|
||||||
|
|
||||||
|
# check if letsencrypt is on
|
||||||
|
if [ "${letsencrypt}" != "on" ]; then
|
||||||
|
echo "error='letsenscrypt is not on'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# get and check parameters
|
# get and check parameters
|
||||||
dnsservice=$2
|
dnsservice=$2
|
||||||
FQDN=$3
|
FQDN=$3
|
||||||
@@ -183,7 +189,7 @@ elif [ "$1" = "issue-cert" ]; then
|
|||||||
# create certicicates
|
# create certicicates
|
||||||
echo "# creating certs for ${FQDN}"
|
echo "# creating certs for ${FQDN}"
|
||||||
/home/admin/.acme.sh/acme.sh --force --home "/home/admin/.acme.sh" --config-home "/mnt/hdd/app-data/letsencrypt" --cert-home "/mnt/hdd/app-data/letsencrypt/certs" --issue --dns ${dnsservice} -d ${FQDN} --keylength ec-256 2>&1
|
/home/admin/.acme.sh/acme.sh --force --home "/home/admin/.acme.sh" --config-home "/mnt/hdd/app-data/letsencrypt" --cert-home "/mnt/hdd/app-data/letsencrypt/certs" --issue --dns ${dnsservice} -d ${FQDN} --keylength ec-256 2>&1
|
||||||
success=$(./.acme.sh/acme.sh --list | grep -c "${FQDN}")
|
success=$(/home/admin/.acme.sh/acme.sh --list | grep -c "${FQDN}")
|
||||||
if [ ${success} -eq 0 ]; then
|
if [ ${success} -eq 0 ]; then
|
||||||
sleep 6
|
sleep 6
|
||||||
echo "error='acme failed'"
|
echo "error='acme failed'"
|
||||||
|
Reference in New Issue
Block a user