summaryrefslogtreecommitdiffstats
path: root/tv/3modules/iptables.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-08 03:40:41 +0100
committertv <tv@krebsco.de>2016-02-08 03:40:41 +0100
commit42d2d5de77590e7d6c421a3f7d80126f34646750 (patch)
tree4ba679cf8b3dd14295783903c2f0d944f469c3de /tv/3modules/iptables.nix
parent8e93530796982db49ddeb06201d2f5bb57d51ccc (diff)
tv.iptables: inline startScript and use SyslogIdentifier
Diffstat (limited to 'tv/3modules/iptables.nix')
-rw-r--r--tv/3modules/iptables.nix18
1 files changed, 7 insertions, 11 deletions
diff --git a/tv/3modules/iptables.nix b/tv/3modules/iptables.nix
index a4ebef44f..4924db4f3 100644
--- a/tv/3modules/iptables.nix
+++ b/tv/3modules/iptables.nix
@@ -48,7 +48,12 @@ let
Type = "simple";
RemainAfterExit = true;
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
'';
-
- startScript = pkgs.writeScript "tv-iptables_start" ''
- #! /bin/sh
- set -euf
- iptables-restore < ${rules 4}
- ip6tables-restore < ${rules 6}
- '';
-
-in
-out
+in out
#let
# cfg = config.tv.iptables;