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

17 lines
517 B
Fish
Raw 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)
echo "$config" | NAME=$name jq '.networkFiles[env.NAME]' | sudo tee "/etc/systemd/network/10-$name.network" >/dev/null
end
end
runInstaller $argv
end