Вывод двойных кавычек и переменной

bsdtar(, который является обычным tar(1)во FreeBSD и легко устанавливается в Linux, )может прозрачно извлекать файлы .jarи многие другие форматы архивов.

.jarв основном .zipфайлы.

0
05.04.2020, 13:00
1 ответ

Я предоставлю обновление в качестве потенциального ответа для всех, кто столкнется с этим в будущем.

при выполнении команды certbot:

certbot certonly --manual --preferred-challenges=dns --manual-auth-hook /etc/letsencrypt/customScripts/authenticator.sh -d *.example.com --dry-run

скрипт authentication.sh теперь:

#!/bin/bash
new='"'
new2=$new$CERTBOT_VALIDATION$new
pdnsutil add-record example.com _acme-challenge txt 120 $new2
echo $new2 > output.log
# Sleep to make sure the change has time to propagate over to DNS
sleep 25

Это работает, объединяя переменные в виде строк для добавления двойных кавычек. output.log показывает, что переменная была

cat output.log 
"RipQQbHO5pG95nzJjouCgTXJMrGTbLKQ5XsV5Zgn7uI"

и отчеты certbot:

certbot certonly --manual --preferred-challenges=dns --manual-auth-hook /etc/letsencrypt/customScripts/authenticator.sh -d *.example.com --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for example.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NOTE: The IP of this machine will be publicly logged as having requested this
certificate. If you're running certbot in manual mode on a machine that is not
your server, please ensure you're okay with that.

Are you OK with your IP being logged?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Output from authenticator.sh:
RipQQbHO5pG95nzJjouCgTXJMrGTbLKQ5XsV5Zgn7uI
New rrset:
_acme-challenge.example.com. IN TXT 120 "RipQQbHO5pG95nzJjouCgTXJMrGTbLKQ5XsV5Zgn7uI"

Error output from authenticator.sh:
Apr 05 10:51:41 Reading random entropy from '/dev/urandom'
Apr 05 10:51:41 gmysql Connection successful. Connected to database 'pdns' on '127.0.0.1'.
Apr 05 10:51:41 gmysql Connection successful. Connected to database 'pdns' on '127.0.0.1'.

Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - The dry run was successful.

так что это, кажется, решило это.

0
28.04.2021, 23:18

Теги

Похожие вопросы