mrhackcz / wedos-hook Goto Github PK
View Code? Open in Web Editor NEWWedos hook shell script for dehydrated ACME client
License: European Union Public License 1.2
Wedos hook shell script for dehydrated ACME client
License: European Union Public License 1.2
Thanks for the hook, however the script got stuck after Deploying challenge tokens..
The response is print out, there is TXT record with challenge in DNS (I had checked that it went through using wedos administration ) but the dehydrated exits after the response instead of continuation. Any hint why it behaves that way?
...
+ 1 pending challenge(s)
+ Deploying challenge tokens...
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": 1564501317,
"svTRID": "1564501317.6257.6725.1",
"command": "dns-row-update"
}
}
Hello :)
I have problem with your script. I cannot renew certficate even when I use --force
dehydrated -v
:
# INFO: Using main config file /etc/dehydrated/config
Dehydrated by Lukas Schauer
https://dehydrated.io
Dehydrated version: git-master-after-0.6.2
GIT-Revision: unknown
OS: Raspbian GNU/Linux 9
Used software:
bash: 4.4.12(1)-release
curl: curl 7.52.1
awk: mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
sed: sed (GNU sed) 4.4
mktemp: mktemp (GNU coreutils) 8.26
grep: grep (GNU grep) 2.27
diff: diff (GNU diffutils) 3.5
openssl: OpenSSL 1.1.0f 25 May 2017
Few last lines with debug enabled:
+ challenge='{"type": "dns-01", "status": "valid", "url": "https://acme-v02.api.letsencrypt.org/acme/challenge/PX0mDoyKv3B9Z2wWrAXWIv1whG4fGdPQYbJieOnbQ_Q/10995614501", "token": "EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI", "validationRecord": [{"hostname": "example.eu"}'
+ '[' -z '{"type": "dns-01", "status": "valid", "url": "https://acme-v02.api.letsencrypt.org/acme/challenge/PX0mDoyKv3B9Z2wWrAXWIv1whG4fGdPQYbJieOnbQ_Q/10995614501", "token": "EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI", "validationRecord": [{"hostname": "example.eu"}' ']'
+ challenge_names[${idx}]=example.eu
++ echo '{"type": "dns-01", "status": "valid", "url": "https://acme-v02.api.letsencrypt.org/acme/challenge/PX0mDoyKv3B9Z2wWrAXWIv1whG4fGdPQYbJieOnbQ_Q/10995614501", "token": "EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI", "validationRecord": [{"hostname": "example.eu"}'
++ get_json_string_value token
++ local filter
+++ printf 's/.*"%s": *"\([^"]*\)".*/\\1/p' token
++ filter='s/.*"token": *"\([^"]*\)".*/\1/p'
++ sed -n 's/.*"token": *"\([^"]*\)".*/\1/p'
+ challenge_tokens[${idx}]=EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI
+ [[ 2 -eq 2 ]]
++ echo '{"type": "dns-01", "status": "valid", "url": "https://acme-v02.api.letsencrypt.org/acme/challenge/PX0mDoyKv3B9Z2wWrAXWIv1whG4fGdPQYbJieOnbQ_Q/10995614501", "token": "EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI", "validationRecord": [{"hostname": "example.eu"}'
++ get_json_string_value url
++ local filter
++ _sed 's/"validationRecord": ?\[[^]]+\]//g'
++ [[ Linux = \L\i\n\u\x ]]
++ sed -r 's/"validationRecord": ?\[[^]]+\]//g'
+++ printf 's/.*"%s": *"\([^"]*\)".*/\\1/p' url
++ filter='s/.*"url": *"\([^"]*\)".*/\1/p'
++ sed -n 's/.*"url": *"\([^"]*\)".*/\1/p'
+ challenge_uris[${idx}]=https://acme-v02.api.letsencrypt.org/acme/challenge/PX0mDoyKv3B9Z2wWrAXWIv1whG4fGdPQYbJieOnbQ_Q/10995614501
+ keyauth=EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI.G6Y5HKEDkwrMmrIVfRS_l65Q3D6xWp9O2SLjtkhvP9c
+ case "${CHALLENGETYPE}" in
++ openssl dgst -sha256 -binary
++ urlbase64
++ printf %s EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI.G6Y5HKEDkwrMmrIVfRS_l65Q3D6xWp9O2SLjtkhvP9c
++ openssl base64 -e
++ tr -d '\n\r'
++ _sed -e 's:=*$::g' -e y:+/:-_:
++ [[ Linux = \L\i\n\u\x ]]
++ sed -r -e 's:=*$::g' -e y:+/:-_:
+ keyauth_hook=NLGYhTlw2Iz-QacFLdjvMMJjzJRGJjDp-yGIQnEeN_w
+ keyauths[${idx}]=EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI.G6Y5HKEDkwrMmrIVfRS_l65Q3D6xWp9O2SLjtkhvP9c
+ deploy_args[${idx}]='example.eu EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI NLGYhTlw2Iz-QacFLdjvMMJjzJRGJjDp-yGIQnEeN_w'
+ idx=1
+ local num_pending_challenges=1
+ echo ' + 1 pending challenge(s)'
+ 1 pending challenge(s)
+ [[ 1 -ne 0 ]]
+ echo ' + Deploying challenge tokens...'
+ Deploying challenge tokens...
+ [[ -n /etc/dehydrated/wedos-hook.sh ]]
+ [[ no = \y\e\s ]]
+ [[ -n /etc/dehydrated/wedos-hook.sh ]]
+ local idx=0
+ '[' 0 -lt 1 ']'
+ /etc/dehydrated/wedos-hook.sh deploy_challenge example.eu EtS1Cksd6oDWaHVa2NIrNB2EboAQM-Z2z3sFnUwfZkI NLGYhTlw2Iz-QacFLdjvMMJjzJRGJjDp-yGIQnEeN_w
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": 1546461484,
"svTRID": "1546461484.2126.23022.1",
"command": "dns-row-update"
}
}
+ remove_lock
+ rm -f /etc/dehydrated/lock
PS: I replaced my real webhost with example.eu
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.