mirror of
https://github.com/angristan/openvpn-install.git
synced 2024-11-14 21:09:03 +01:00
Fix systemd unit issue on Debian 9 (#585)
On Debian 9 the copy of unit file `/etc/systemd/system/openvpn@.service` has no effect, see #583. Same problem as #129 and #378, unit can not start on OpenVZ. It must execute `systemctl enable` before `systemctl restart`. So the new link to `/etc/systemd/system/openvpn@.service` was created before `systemctl restart`. Fix https://github.com/angristan/openvpn-install/issues/583
This commit is contained in:
parent
3d075c8708
commit
44105eb060
@ -887,8 +887,8 @@ verb 3" >> /etc/openvpn/server.conf
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart openvpn-server@server
|
||||
systemctl enable openvpn-server@server
|
||||
systemctl restart openvpn-server@server
|
||||
elif [[ "$OS" == "ubuntu" ]] && [[ "$VERSION_ID" == "16.04" ]]; then
|
||||
# On Ubuntu 16.04, we use the package from the OpenVPN repo
|
||||
# This package uses a sysvinit service
|
||||
@ -904,8 +904,8 @@ verb 3" >> /etc/openvpn/server.conf
|
||||
sed -i 's|/etc/openvpn/server|/etc/openvpn|' /etc/systemd/system/openvpn\@.service
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart openvpn@server
|
||||
systemctl enable openvpn@server
|
||||
systemctl restart openvpn@server
|
||||
fi
|
||||
|
||||
if [[ $DNS == 2 ]];then
|
||||
|
Loading…
Reference in New Issue
Block a user