1
1
mirror of https://github.com/namibia/openvpn-install.git synced 2024-11-17 17:55:12 +00:00
- Little fix for Debian Jessie
- Better systemd detection
- Fixed revocation on CentOS
This commit is contained in:
Nyr 2015-04-28 18:35:54 +02:00
parent 68b5ff7e99
commit cf48ecd3b0

View File

@ -115,7 +115,16 @@ if [[ -e /etc/openvpn/server.conf ]]; then
# If it's the first time revoking a cert, we need to add the crl-verify line
if ! grep -q "crl-verify" "/etc/openvpn/server.conf"; then
echo "crl-verify /etc/openvpn/easy-rsa/2.0/keys/crl.pem" >> "/etc/openvpn/server.conf"
/etc/init.d/openvpn restart
# And restart
if pgrep systemd-journal; then
systemctl restart openvpn@server.service
else
if [[ "$OS" = 'debian' ]]; then
/etc/init.d/openvpn restart
else
service openvpn restart
fi
fi
fi
echo ""
echo "Certificate for client $CLIENT revoked"
@ -288,10 +297,14 @@ else
fi
# And finally, restart OpenVPN
if [[ "$OS" = 'debian' ]]; then
/etc/init.d/openvpn restart
else
# Little hack to check for systemd
if pidof systemd; then
if pgrep systemd-journal; then
systemctl restart openvpn@server.service
else
/etc/init.d/openvpn restart
fi
else
if pgrep systemd-journal; then
systemctl restart openvpn@server.service
systemctl enable openvpn@server.service
else