tv.iptables: inline startScript and use SyslogIdentifier

This commit is contained in:
tv 2016-02-08 03:40:41 +01:00
parent 8e93530796
commit 42d2d5de77

View File

@ -48,7 +48,12 @@ let
Type = "simple"; Type = "simple";
RemainAfterExit = true; RemainAfterExit = true;
Restart = "always"; Restart = "always";
ExecStart = "@${startScript} tv-iptables_start"; SyslogIdentifier = "tv-iptables_start";
ExecStart = pkgs.writeDash "tv-iptables_start" ''
set -euf
iptables-restore < ${rules 4}
ip6tables-restore < ${rules 6}
'';
}; };
}; };
}; };
@ -108,16 +113,7 @@ let
)} )}
COMMIT COMMIT
''; '';
in out
startScript = pkgs.writeScript "tv-iptables_start" ''
#! /bin/sh
set -euf
iptables-restore < ${rules 4}
ip6tables-restore < ${rules 6}
'';
in
out
#let #let
# cfg = config.tv.iptables; # cfg = config.tv.iptables;