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:
parent
d4efae3b10
commit
510f9e1bf8
@ -358,21 +358,9 @@ exit 0' > $RCLOCAL
|
|||||||
semanage port -a -t openvpn_port_t -p $PROTOCOL $PORT
|
semanage port -a -t openvpn_port_t -p $PROTOCOL $PORT
|
||||||
fi
|
fi
|
||||||
# And finally, restart OpenVPN
|
# And finally, restart OpenVPN
|
||||||
if [[ "$OS" = 'debian' ]]; then
|
systemctl restart openvpn@server.service
|
||||||
# Little hack to check for systemd
|
if [[ "$OS" = 'centos' ]]; then
|
||||||
if pgrep systemd-journal; then
|
systemctl enable openvpn@server.service
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
# If the server is behind a NAT, use the correct IP address
|
# If the server is behind a NAT, use the correct IP address
|
||||||
if [[ "$PUBLICIP" != "" ]]; then
|
if [[ "$PUBLICIP" != "" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user