mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Update general/overlay/usr/sbin/wireguard
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>pull/1882/head
							parent
							
								
									b87c0e1693
								
							
						
					
					
						commit
						aa48cf5b42
					
				|  | @ -19,5 +19,10 @@ ip link add dev wg0 type wireguard | |||
| ) >>/tmp/wireguard.conf | ||||
| 
 | ||||
| wg setconf wg0 /tmp/wireguard.conf | ||||
| ip address add dev wg0 $(fw_printenv -n wg_address) | ||||
| wg_address="$(fw_printenv -n wg_address)" | ||||
| if [ -z "$wg_address" ]; then | ||||
|     echo "Error: wg_address environment variable is not set or empty." >&2 | ||||
|     exit 1 | ||||
| fi | ||||
| ip address add dev wg0 "$wg_address" | ||||
| ip link set up dev wg0 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue