router/link.fish
2022-01-31 11:40:03 -06:00

27 lines
473 B
Fish
Executable file

#!/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
relink dnsmasq.conf /etc/dnsmasq.conf
recopy lan0.link /etc/systemd/network/10-lan0.link
recopy wan0.link /etc/systemd/network/10-wan0.link
recopy wan0.network /etc/systemd/network/wan0.network
recopy lan0.network /etc/systemd/network/lan0.network
mkinitcpio -p linux