mirror of
				https://github.com/angristan/openvpn-install.git
				synced 2025-11-04 07:57:37 +01: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:
		@@ -558,8 +558,17 @@ verb 3" >> /etc/openvpn/server.conf
 | 
			
		||||
		fi
 | 
			
		||||
	else
 | 
			
		||||
		if pgrep systemd-journal; then
 | 
			
		||||
			systemctl restart openvpn@server.service
 | 
			
		||||
			systemctl enable openvpn@server.service
 | 
			
		||||
			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 enable openvpn@server.service
 | 
			
		||||
			fi
 | 
			
		||||
		else
 | 
			
		||||
			service openvpn restart
 | 
			
		||||
			chkconfig openvpn on
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user