--renew-hook from type __letsencrypt_cert is not working #112

Closed
opened 2021-11-20 13:24:06 +00:00 by ungleich-gitea · 2 comments

Created by: greendeath

When running this command:
echo __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook 'service nginx reload' "monitoring.place6.ungleich.ch" --domain "monitoring.place6.ungleich.ch" --domain "monitoring2.ungleich.ch" --automatic-renewal | cdist config -vi - monitoring.place6.ungleich.ch

I get this error:
__letsencrypt_cert: error: unrecognized arguments: reload monitoring.place6.ungleich.ch

*Created by: greendeath* When running this command: `echo __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook 'service nginx reload' "monitoring.place6.ungleich.ch" --domain "monitoring.place6.ungleich.ch" --domain "monitoring2.ungleich.ch" --automatic-renewal | cdist config -vi - monitoring.place6.ungleich.ch` I get this error: __letsencrypt_cert: error: unrecognized arguments: reload monitoring.place6.ungleich.ch
ungleich-gitea added the
bugfix
label 2021-11-20 13:24:06 +00:00
Author
Owner

Created by: greendeath

Fixed it, thank you!

*Created by: greendeath* Fixed it, thank you!
Author
Owner

Created by: darko-poljak

@greendeath

echo __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook 'service nginx reload' "monitoring.place6.ungleich.ch" --domain "monitoring.place6.ungleich.ch" --domain "monitoring2.ungleich.ch" --automatic-renewal

results in

__letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook service nginx reload monitoring.place6.ungleich.ch --domain monitoring.place6.ungleich.ch --domain monitoring2.ungleich.ch --automatic-renewal

where servie nginx reload is not a single argument.
It should be quoted.

You should do something like

$ echo __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook '"service nginx reload"' "monitoring.place6.ungleich.ch" --domain "monitoring.place6.ungleich.ch" --domain "monitoring2.ungleich.ch" --automatic-renewal
__letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook "service nginx reload" monitoring.place6.ungleich.ch --domain monitoring.place6.ungleich.ch --domain monitoring2.ungleich.ch --automatic-renewal

It's a shell thing.

*Created by: darko-poljak* @greendeath ``` echo __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook 'service nginx reload' "monitoring.place6.ungleich.ch" --domain "monitoring.place6.ungleich.ch" --domain "monitoring2.ungleich.ch" --automatic-renewal ``` results in ``` __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook service nginx reload monitoring.place6.ungleich.ch --domain monitoring.place6.ungleich.ch --domain monitoring2.ungleich.ch --automatic-renewal ``` where `servie nginx reload` is not a single argument. It should be quoted. You should do something like ``` $ echo __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook '"service nginx reload"' "monitoring.place6.ungleich.ch" --domain "monitoring.place6.ungleich.ch" --domain "monitoring2.ungleich.ch" --automatic-renewal __letsencrypt_cert --admin-email technik@ungleich.ch --webroot /var/www --renew-hook "service nginx reload" monitoring.place6.ungleich.ch --domain monitoring.place6.ungleich.ch --domain monitoring2.ungleich.ch --automatic-renewal ``` It's a shell thing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#112
No description provided.