Oops, can't have a full stop in a variable name.

This commit is contained in:
tim 2024-11-07 22:44:22 +00:00
parent ccd829b9f0
commit 333db37b71
1 changed files with 6 additions and 6 deletions

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
acme.sh="/root/.acme.sh/acme.sh" acmesh="/root/.acme.sh/acme.sh"
if [ ! -f "$acme.sh"]; then if [ ! -f "$acmesh"]; then
echo "acme.sh binary ($acme.sh) not found. Please update the path or download it from here: https://github.com/acmesh-official/acme.sh" echo "acme.sh binary \"($acmesh)\" not found. Please update the path or download it from here: https://github.com/acmesh-official/acme.sh"
exit 1 exit 1
fi fi
@ -50,17 +50,17 @@ nginx -t
echo -n "Please make sure the test passed successfully and fix any issues if it didn't [Enter]" echo -n "Please make sure the test passed successfully and fix any issues if it didn't [Enter]"
read read
/root/.acme.sh/acme.sh --set-default-ca --server letsencrypt acmesh --set-default-ca --server letsencrypt
echo -n '[Enter] to continue' echo -n '[Enter] to continue'
read read
/root/.acme.sh/acme.sh --issue -d "$domain" -w "/var/www/$domain/" acmesh --issue -d "$domain" -w "/var/www/$domain/"
echo -n '[Enter] to continue' echo -n '[Enter] to continue'
read read
mkdir -p -v "/etc/nginx/certs/$domain" mkdir -p -v "/etc/nginx/certs/$domain"
/root/.acme.sh/acme.sh --install-cert -d "$domain" --cert-file "/etc/nginx/certs/$domain/cert.pem" --key-file "/etc/nginx/certs/$domain/key.key" --fullchain-file "/etc/nginx/certs/$domain/fullchain.cer" --reloadcmd "service nginx force-reload" acmesh --install-cert -d "$domain" --cert-file "/etc/nginx/certs/$domain/cert.pem" --key-file "/etc/nginx/certs/$domain/key.key" --fullchain-file "/etc/nginx/certs/$domain/fullchain.cer" --reloadcmd "service nginx force-reload"
echo -n '[Enter] to continue' echo -n '[Enter] to continue'
read read