Last active
April 6, 2024 04:40
-
-
Save wangjiezhe/42cdb4a72890301a118d27052d022970 to your computer and use it in GitHub Desktop.
install acme.sh and issue a certificate on archlinux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pacman -S --noconfirm acme.sh | |
yay -S --noconfirm acme.sh-systemd | |
# https://ram.console.aliyun.com/users | |
# require `AliyunDNSFullAccess` | |
export Ali_Key="***" | |
export Ali_Secret="***" | |
acme.sh --register-account -m test@a.com --home /etc/acme.sh | |
acme.sh --issue --dns dns_ali -d a.com -d *.a.com --home /etc/acme.sh | |
acme.sh --install-cert -d a.com -d *.a.com --key-file /etc/nginx/ssl/key.pem --fullchain-file /etc/nginx/ssl/cert.pem --reloadcmd "systemctl reload nginx" --home /etc/acme.sh | |
systemctl enable acme.sh.timer | |
systemctl start acme.sh.timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Service] | |
ReadWritePaths=/etc/acme.sh/ | |
ReadWritePaths=/var/log/acme.sh/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment