PortValhalla/scripts/Common/Software/systemd-networkd/main.fish

17 lines
530 B
Fish
Raw Permalink Normal View History

2024-12-08 00:03:06 +00:00
#!/bin/env fish
begin
set -l dir (status dirname)
source "$dir/../../../lib/software.fish"
function configureSW -V dir
source "$dir/../../../lib/settings.fish"
set config (getProgramConfig $argv --json)
for name in (echo "$config" | jq '.networkFiles | keys[]' --raw-output0 | string split0 || true)
2024-12-08 02:07:54 +00:00
echo "$config" | NAME=$name jq '.networkFiles[env.NAME]' --raw-output | sudo tee "/etc/systemd/network/10-$name.network" >/dev/null
2024-12-08 00:03:06 +00:00
end
end
runInstaller $argv
end