Created
February 25, 2023 06:23
-
-
Save ioxorg/126fdcf2d70c363921e5e95b1fba828a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
read -p 'Enter Email : ' email | |
read -p 'Enter Domain : ' domain | |
function install_socat() { | |
apt install socat -y | |
} | |
function install_acme() { | |
curl https://get.acme.sh | sh | |
} | |
function install_cert() { | |
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt | |
~/.acme.sh/acme.sh --register-account -m $email | |
~/.acme.sh/acme.sh --issue -d $domain --standalone --debug | |
~/.acme.sh/acme.sh --installcert -d $domain --key-file /root/private.key --fullchain-file /root/cert.crt | |
} | |
function main() { | |
install_socat | |
install_acme | |
install_cert | |
} | |
main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment