Skip to content

Instantly share code, notes, and snippets.

@duckworth
Forked from mkubenka/install.sh
Last active December 11, 2020 14:24
Show Gist options
  • Save duckworth/349a2233bea822e3830655df57abc3c6 to your computer and use it in GitHub Desktop.
Save duckworth/349a2233bea822e3830655df57abc3c6 to your computer and use it in GitHub Desktop.
OpenVPN Access Server Letsencrypt
#!/bin/sh
apt-get -y install socat
curl https://get.acme.sh | sh
#!/bin/sh
DOMAIN="vpn.server.com"
set -eu
service openvpnas stop
acme.sh --issue --alpn -d $DOMAIN
service openvpnas start
/usr/local/openvpn_as/scripts/sacli --key "cs.ca_bundle" --value_file "$HOME/.acme.sh/$DOMAIN/fullchain.cer" ConfigPut
/usr/local/openvpn_as/scripts/sacli --key "cs.priv_key" --value_file "$HOME/.acme.sh/$DOMAIN/$DOMAIN.key" ConfigPut
/usr/local/openvpn_as/scripts/sacli --key "cs.cert" --value_file "$HOME/.acme.sh/$DOMAIN/$DOMAIN.cer" ConfigPut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment