[nftables] add templating support into our type

This commit is contained in:
Nico Schottelius 2020-08-18 12:35:29 +02:00
commit c3afa7d5d0

View file

@ -22,8 +22,16 @@ else
fi
MONITORING_HOSTS="emonitor1.place5.ungleich.ch, emonitor1.place6.ungleich.ch, server1.place4.ungleich.ch, monitoring-v3.ungleich.ch"
mkdir "$__object/files"
srctmp="$__object/files/nftables.nft"
sed "s/MONITORING_HOSTS/$MONITORING_HOSTS/" "${srcfile}" > "$srctmp"
__package nftables
__file ${conf} --source "$srcfile" --mode 0644
__file ${conf} --source "$srctmp" --mode 0644
case $os in
# Alpine actually has an init script, as opposed to everyone else