mirror of
https://github.com/namibia/openvpn-install.git
synced 2024-12-23 07:18:54 +00:00
Implements OpenVPN 2.4 changes for Arch Linux (kind of)
Since OpenVPN 2.4 is out on Arch, the script wasn't working completely because of this : https://www.archlinux.org/news/openvpn-240-update-requires-administrative-interaction/ There is a new path for OpenVPN server config. This is just needed on Arch for now, and you're probably not going to run an OpenVPN client on an OpenVPN server. Thus I modified the systemd script to use `/etc/openvpn/` and `server.conf` instead of the new `/etc/openvpn/server/` and `openvpn.conf`. By using the same paths as the other distros, I avoid to rewrite the entire script to change the paths... It's not 100% clean, but it works pretty well. If you have any objection please leave a comment. Also, I updated the new service name. As far as I tested, it's working fine on Arch Linux for now. Fixes #63 and #61
This commit is contained in:
parent
ac203dd5ee
commit
19fe6626f1
@ -558,8 +558,17 @@ verb 3" >> /etc/openvpn/server.conf
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if pgrep systemd-journal; then
|
if pgrep systemd-journal; then
|
||||||
|
if [[ "$OS" = 'arch']]; then
|
||||||
|
#Workaround to avoid rewriting the entire script for Arch
|
||||||
|
sed -i 's|/etc/openvpn/server|/etc/openvpn|' /usr/lib/systemd/system/openvpn-server@.service
|
||||||
|
sed -i 's|%i.conf|server.conf|' /usr/lib/systemd/system/openvpn-server@.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart openvpn-server@openvpn.service
|
||||||
|
systemctl enable openvpn-server@openvpn.service
|
||||||
|
else
|
||||||
systemctl restart openvpn@server.service
|
systemctl restart openvpn@server.service
|
||||||
systemctl enable openvpn@server.service
|
systemctl enable openvpn@server.service
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
service openvpn restart
|
service openvpn restart
|
||||||
chkconfig openvpn on
|
chkconfig openvpn on
|
||||||
|
Loading…
Reference in New Issue
Block a user