tv.iptables: inline startScript and use SyslogIdentifier
This commit is contained in:
parent
8e93530796
commit
42d2d5de77
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user