mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-22 08:49:03 +01:00
Bugfixes
- Little fix for Debian Jessie - Better systemd detection - Fixed revocation on CentOS
This commit is contained in:
parent
68b5ff7e99
commit
cf48ecd3b0
@ -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 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
|
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"
|
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
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "Certificate for client $CLIENT revoked"
|
echo "Certificate for client $CLIENT revoked"
|
||||||
@ -288,10 +297,14 @@ else
|
|||||||
fi
|
fi
|
||||||
# And finally, restart OpenVPN
|
# And finally, restart OpenVPN
|
||||||
if [[ "$OS" = 'debian' ]]; then
|
if [[ "$OS" = 'debian' ]]; then
|
||||||
/etc/init.d/openvpn restart
|
|
||||||
else
|
|
||||||
# Little hack to check for systemd
|
# 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 restart openvpn@server.service
|
||||||
systemctl enable openvpn@server.service
|
systemctl enable openvpn@server.service
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user