(This guide assumes you're not living in the stoneages and are using 64bit centos)

init_openvpnas

/etc/letsencrypt/init_openvpnas

#!/bin/sh

DOMAIN="blah.tld"

/usr/local/openvpn_as/scripts/confdba -mk cs.ca_bundle -v "`cat /etc/letsencrypt/live/$DOMAIN/fullchain.pem`"
/usr/local/openvpn_as/scripts/confdba -mk cs.priv_key -v "`cat /etc/letsencrypt/live/$DOMAIN/privkey.pem`" > /dev/null
/usr/local/openvpn_as/scripts/confdba -mk cs.cert -v "`cat /etc/letsencrypt/live/$DOMAIN/cert.pem`"

systemctl restart openvpnas

upd_openvpnas

/etc/letsencrypt/upd_openvpnas

#!/bin/sh

DOMAIN="blah.tld"

SHA=`sha1sum /etc/letsencrypt/live/$DOMAIN/fullchain.pem | cut -d " " -f 1`

certbot renew -n --standalone --pre-hook "systemctl stop openvpnas" --post-hook "systemctl start openvpnas" --agree-tos >/dev/null 2>/dev/null

NEWSHA=`sha1sum /etc/letsencrypt/live/$DOMAIN/fullchain.pem | cut -d " " -f 1`

[ "$NEWSHA" = "$SHA" ] && exit 0

/usr/local/openvpn_as/scripts/confdba -mk cs.ca_bundle -v "`cat /etc/letsencrypt/live/$DOMAIN/fullchain.pem`"
/usr/local/openvpn_as/scripts/confdba -mk cs.priv_key -v "`cat /etc/letsencrypt/live/$DOMAIN/privkey.pem`" > /dev/null
/usr/local/openvpn_as/scripts/confdba -mk cs.cert -v "`cat /etc/letsencrypt/live/$DOMAIN/cert.pem`"

systemctl restart openvpnas
openvpnas.txt · Last modified: 2020/03/30 21:53 by andrew
Back to top
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0