diff --git a/openvpn-install.sh b/openvpn-install.sh index 4cc1e7a..e8d7b5c 100755 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -608,22 +608,15 @@ status openvpn.log if pgrep systemd-journal; then if [[ "$VERSION_ID" = 'VERSION_ID="9"' ]]; then #Workaround to fix OpenVPN service on Debian 9 OpenVZ - sed -i 's|LimitNPROC|#LimitNPROC|' lib/systemd/system/openvpn-server\@.service + sed -i 's|LimitNPROC|#LimitNPROC|' /lib/systemd/system/openvpn-server\@.service sed -i 's|/etc/openvpn/server|/etc/openvpn|' /lib/systemd/system/openvpn-server\@.service sed -i 's|%i.conf|server.conf|' /lib/systemd/system/openvpn-server\@.service systemctl daemon-reload systemctl restart openvpn-server@openvpn.service systemctl enable openvpn-server@openvpn.service - elif [[ "$VERSION_ID" = 'VERSION_ID="16.04"' ]]; then - #The file is in a other dir - sed -i 's|LimitNPROC|#LimitNPROC|' /lib/systemd/system/openvpn\@.service - sed -i 's|/etc/openvpn/server|/etc/openvpn|' /lib/systemd/system/openvpn\@.service - sed -i 's|%i.conf|server.conf|' /lib/systemd/system/openvpn\@.service - systemctl daemon-reload - systemctl restart openvpn-serve\@openvpn.service - systemctl enable openvpn-server@openvpn.service - else + sed -i 's|LimitNPROC|#LimitNPROC|' /lib/systemd/system/openvpn\@.service + systemctl daemon-reload systemctl restart openvpn@server.service fi else