./dehydrated -x -c
# INFO: Using main config file /opt/dehydrated/config
Processing www.xxxxx.xx
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Mar 19 12:48:00 2017 GMT (Longer than 30 days). Ignoring because renew was forced!
+ Signing domains...
+ Generating private key...
+ Generating signing request...
+ Requesting challenge for www.xxxxx.xx...
+ Already validated
./dehydrated: line 515: deploy_args: unbound variable
Originally created by @lingej on GitHub (Dec 20, 2016).
Hi
running dehydrated version 7f30826a6dad1c1f07641aaa48cccb74480998ab on Debian 8
deploy_args is empty on line 515 if challenge_status is "valid" on line 474 ( https://github.com/lukas2511/dehydrated/blob/master/dehydrated#L474
Joerg
```
./dehydrated -x -c
# INFO: Using main config file /opt/dehydrated/config
Processing www.xxxxx.xx
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Mar 19 12:48:00 2017 GMT (Longer than 30 days). Ignoring because renew was forced!
+ Signing domains...
+ Generating private key...
+ Generating signing request...
+ Requesting challenge for www.xxxxx.xx...
+ Already validated
./dehydrated: line 515: deploy_args: unbound variable
```
Same problem some lines below with check_altnames.
I solved this by surrounding with if [[ ${deploy_args[@]:+${deploy_args[@]}} ]]; then [...] fi, if [[ ${check_altnames[@]:+${ceck_altnames[@]}} ]]; then [...] fi.
But maybe there is a way for proper initialisation with Bash.
@speters commented on GitHub (Dec 20, 2016):
Same problem some lines below with check_altnames.
I solved this by surrounding with ` if [[ ${deploy_args[@]:+${deploy_args[@]}} ]]; then [...] fi`, ` if [[ ${check_altnames[@]:+${ceck_altnames[@]}} ]]; then [...] fi`.
But maybe there is a way for proper initialisation with Bash.
473 challenge_status="$(printf '%s' "${response}" | rm_json_arrays | get_json_string_value status)"
474 if [ "${challenge_status}" = "valid" ]; then
475 echo " + Already validated"
476 #continue
477 fi
@Mareak commented on GitHub (Dec 20, 2016):
Hi,
You have to comment the line 476 :
473 challenge_status="$(printf '%s' "${response}" | rm_json_arrays | get_json_string_value status)"
474 if [ "${challenge_status}" = "valid" ]; then
475 echo " + Already validated"
476 #continue
477 fi
Commenting out the 'continue' works but break the feature it was supposed to add. I added a test for an empty array around the challenge loop that resolved it for me, and the feature to skip the challenge for already validated names works.
if [ ${#challenge_altnames[@]} -ne 0 ]; then
for altname in "${challenge_altnames[@]:0}"; do
...
done
fi
I created a pull request #321 to make this change.
@whereisaaron commented on GitHub (Dec 21, 2016):
Commenting out the 'continue' works but break the feature it was supposed to add. I added a test for an empty array around the challenge loop that resolved it for me, and the feature to skip the challenge for already validated names works.
```
if [ ${#challenge_altnames[@]} -ne 0 ]; then
for altname in "${challenge_altnames[@]:0}"; do
```
...
```
done
fi
````
I created a pull request #321 to make this change.
Just installed and ran the patched code, but am still getting the same error that @lingej posted.
I'm using GNU bash, version 4.3.30(1)-release (arm-unknown-linux-gnueabihf) on Raspbian Jessie.
@evlrbot commented on GitHub (Dec 22, 2016):
Just installed and ran the patched code, but am still getting the same error that @lingej posted.
I'm using GNU bash, version 4.3.30(1)-release (arm-unknown-linux-gnueabihf) on Raspbian Jessie.
I tested a few ways of checking if the array is empty / the variables are undefined, and I think I found the most compatible way over multiple versions of bash, can you please try again?
@lukas2511 commented on GitHub (Dec 22, 2016):
I tested a few ways of checking if the array is empty / the variables are undefined, and I think I found the most compatible way over multiple versions of bash, can you please try again?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @lingej on GitHub (Dec 20, 2016).
Hi
running dehydrated version
7f30826a6don Debian 8deploy_args is empty on line 515 if challenge_status is "valid" on line 474 ( https://github.com/lukas2511/dehydrated/blob/master/dehydrated#L474
Joerg
@speters commented on GitHub (Dec 20, 2016):
Same problem some lines below with check_altnames.
I solved this by surrounding with
if [[ ${deploy_args[@]:+${deploy_args[@]}} ]]; then [...] fi,if [[ ${check_altnames[@]:+${ceck_altnames[@]}} ]]; then [...] fi.But maybe there is a way for proper initialisation with Bash.
@Mareak commented on GitHub (Dec 20, 2016):
Hi,
You have to comment the line 476 :
473 challenge_status="$(printf '%s' "${response}" | rm_json_arrays | get_json_string_value status)"
474 if [ "${challenge_status}" = "valid" ]; then
475 echo " + Already validated"
476 #continue
477 fi
@whereisaaron commented on GitHub (Dec 21, 2016):
Commenting out the 'continue' works but break the feature it was supposed to add. I added a test for an empty array around the challenge loop that resolved it for me, and the feature to skip the challenge for already validated names works.
...
I created a pull request #321 to make this change.
@lukas2511 commented on GitHub (Dec 22, 2016):
I've merged #321, this should be fixed now. Thanks.
@evlrbot commented on GitHub (Dec 22, 2016):
Just installed and ran the patched code, but am still getting the same error that @lingej posted.
I'm using GNU bash, version 4.3.30(1)-release (arm-unknown-linux-gnueabihf) on Raspbian Jessie.
@lukas2511 commented on GitHub (Dec 22, 2016):
I tested a few ways of checking if the array is empty / the variables are undefined, and I think I found the most compatible way over multiple versions of bash, can you please try again?
@evlrbot commented on GitHub (Dec 23, 2016):
Just tested your latest changes, and no more error. Thanks!