Replace path trigger to binding to WireGuard device
This commit is contained in:
		
							
								
								
									
										3
									
								
								systemd-templates/set-ip-routes.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								systemd-templates/set-ip-routes.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
BindsTo=set-ip-routes.service
 | 
			
		||||
Before=set-ip-routes.service
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Detect WireGuard VPN activation
 | 
			
		||||
 | 
			
		||||
[Path]
 | 
			
		||||
PathExists=/sys/class/net/wg0/dev_id
 | 
			
		||||
Unit=set-ip-routes.service
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=default.target
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Update IP routes after connecting to VPN
 | 
			
		||||
BindsTo=sys-subsystem-net-devices-wg0.device
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=oneshot
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user