Forked from sabbour/setup-certbot-openvpn-letsencrypt.sh
Created
October 27, 2018 05:00
-
-
Save silent-vim/12a8ccfcd9134acab9bdb79dba032b9f 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
sudo apt-get -y install software-properties-common | |
sudo add-apt-repository -y ppa:certbot/certbot | |
sudo apt-get -y update | |
sudo apt-get -y install certbot | |
sudo service openvpnas stop | |
sudo certbot certonly \ | |
--standalone \ | |
--non-interactive \ | |
--agree-tos \ | |
--email <YOUR EMAIL> \ | |
--domains <YOUR DOMAIN> \ | |
--pre-hook 'sudo service openvpnas stop' \ | |
--post-hook 'sudo ~/update-openvpn-db.sh' | |
/usr/local/openvpn_as/scripts/sacli --key "cs.priv_key" --value_file "/etc/letsencrypt/live/<YOUR DOMAIN>/privkey.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli --key "cs.cert" --value_file "/etc/letsencrypt/live/<YOUR DOMAIN>/fullchain.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli --key "cs.ca_bundle" --value_file "/etc/letsencrypt/live/<YOUR DOMAIN>/chain.pem" ConfigPut | |
/usr/local/openvpn_as/scripts/sacli start | |
sudo service openvpnas start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment