fix
This commit is contained in:
parent
09691a6439
commit
328240d694
1 changed files with 3 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue