1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-27 15:36:07 +03:00

Remove support for old init systems

It was broken since b3953963ba anyway.
This commit is contained in:
Nyr 2019-05-24 14:47:02 +02:00
parent d4efae3b10
commit 510f9e1bf8

View File

@ -358,21 +358,9 @@ exit 0' > $RCLOCAL
semanage port -a -t openvpn_port_t -p $PROTOCOL $PORT
fi
# And finally, restart OpenVPN
if [[ "$OS" = 'debian' ]]; then
# Little hack to check for systemd
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
service openvpn restart
chkconfig openvpn on
fi
systemctl restart openvpn@server.service
if [[ "$OS" = 'centos' ]]; then
systemctl enable openvpn@server.service
fi
# If the server is behind a NAT, use the correct IP address
if [[ "$PUBLICIP" != "" ]]; then