Skip to content

Instantly share code, notes, and snippets.

@aradhell
Last active June 11, 2019 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aradhell/6992eed22aff7923c3ebc63e5f24ebfa to your computer and use it in GitHub Desktop.
Save aradhell/6992eed22aff7923c3ebc63e5f24ebfa to your computer and use it in GitHub Desktop.
certbot renew openvpn access server SSL
#!/bin/sh
SITE=vpns.xx.net
cd /etc/letsencrypt/live/$SITE
/usr/local/openvpn_as/scripts/sacli --key "cs.priv_key" --value_file "privkey.pem" ConfigPut
/usr/local/openvpn_as/scripts/sacli --key "cs.cert" --value_file "fullchain.pem" ConfigPut
cat fullchain.pem privkey.pem > bundle.pem
/usr/local/openvpn_as/scripts/sacli --key "cs.ca_bundle" --value_file "bundle.pem" ConfigPut
/usr/local/openvpn_as/scripts/sacli start
#cron 15 3 * * * /opt/letsencrypt/letsencrypt-auto certonly --standalone -n -d vpns.xx.net --post-hook /usr/local/bin/renewOpenVpnSSL.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment