Merge pull request #686 from darko-poljak/letsencrypt_cert_explorers_fix
Check if certbot exists before using it. Fixes #685.remotes/origin/shellcheck
commit
b67051fac5
@ -1,4 +1,8 @@ |
|||||||
#!/bin/sh -e |
#!/bin/sh -e |
||||||
|
|
||||||
certbot certificates --cert-name "${__object_id:?}" | grep ' Domains: ' | \ |
certbot_path=$("${__type_explorer}/certbot-path") |
||||||
cut -d ' ' -f 6- | tr ' ' '\n' |
if [ -n "${certbot_path}" ] |
||||||
|
then |
||||||
|
certbot certificates --cert-name "${__object_id:?}" | grep ' Domains: ' | \ |
||||||
|
cut -d ' ' -f 6- | tr ' ' '\n' |
||||||
|
fi |
||||||
|
@ -1,7 +1,13 @@ |
|||||||
#!/bin/sh -e |
#!/bin/sh -e |
||||||
|
|
||||||
if certbot certificates | grep -q " Certificate Name: ${__object_id:?}$"; then |
certbot_path=$("${__type_explorer}/certbot-path") |
||||||
echo yes |
if [ -n "${certbot_path}" ] |
||||||
|
then |
||||||
|
if certbot certificates | grep -q " Certificate Name: ${__object_id:?}$"; then |
||||||
|
echo yes |
||||||
|
else |
||||||
|
echo no |
||||||
|
fi |
||||||
else |
else |
||||||
echo no |
echo no |
||||||
fi |
fi |
||||||
|
@ -1,8 +1,14 @@ |
|||||||
#!/bin/sh -e |
#!/bin/sh -e |
||||||
|
|
||||||
if certbot certificates --cert-name "${__object_id:?}" | \ |
certbot_path=$("${__type_explorer}/certbot-path") |
||||||
grep -q 'INVALID: TEST_CERT'; then |
if [ -n "${certbot_path}" ] |
||||||
echo yes |
then |
||||||
|
if certbot certificates --cert-name "${__object_id:?}" | \ |
||||||
|
grep -q 'INVALID: TEST_CERT'; then |
||||||
|
echo yes |
||||||
|
else |
||||||
|
echo no |
||||||
|
fi |
||||||
else |
else |
||||||
echo no |
echo no |
||||||
fi |
fi |
||||||
|
Loading…
Reference in new issue