#!/usr/bin/env fish if test (id -u) -ne 0 echo "must run as root" exit 1 end function relink rm -f $argv[2] ezln $argv[1] $argv[2] end function recopy rm -f $argv[2] cp $argv[1] $argv[2] end # DNS, DHCP, prefix delegation recopy dnsmasq.conf /etc/dnsmasq.conf recopy resolved.conf /etc/systemd/resolved.conf recopy ./sysctl-configs /etc/sysctl.d/10-router-configs.conf # enable systemd-networkd to setup network interfaces with useful names recopy lan0.link /etc/systemd/network/10-lan0.link recopy wan0.link /etc/systemd/network/10-wan0.link # dhcp client configuration recopy dhcpcd.conf /etc/dhcpcd.conf