Skip to content

Instantly share code, notes, and snippets.

@ioxorg
Created February 25, 2023 06:23
Show Gist options
  • Save ioxorg/126fdcf2d70c363921e5e95b1fba828a to your computer and use it in GitHub Desktop.
Save ioxorg/126fdcf2d70c363921e5e95b1fba828a to your computer and use it in GitHub Desktop.
#!/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