From: Stefan Huber Date: Sat, 4 Jan 2014 20:20:25 +0000 (+0100) Subject: Add iptables systemd units X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=c6c1ee9147727689da2dcae12ae7533afd865ad8;p=shutils.git Add iptables systemd units --- diff --git a/systemd/ip6tables.service b/systemd/ip6tables.service new file mode 100644 index 0000000..4c16a4e --- /dev/null +++ b/systemd/ip6tables.service @@ -0,0 +1,14 @@ +[Unit] +Description=ip6tables +Before=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=/etc/conf.d/ip6tables +ExecStart=/sbin/ip6tables-restore ${SAVE_RESTORE_OPTIONS} ${IP6TABLES_SAVE} +ExecStop=/sbin/ip6tables-save ${SAVE_RESTORE_OPTIONS} ${IP6TABLES_SAVE} + +[Install] +WantedBy=multi-user.target + diff --git a/systemd/iptables.service b/systemd/iptables.service new file mode 100644 index 0000000..46f08ff --- /dev/null +++ b/systemd/iptables.service @@ -0,0 +1,13 @@ +[Unit] +Description=iptables +Before=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=/etc/conf.d/iptables +ExecStart=/sbin/iptables-restore ${SAVE_RESTORE_OPTIONS} ${IPTABLES_SAVE} +ExecStop=/sbin/iptables-save ${SAVE_RESTORE_OPTIONS} ${IPTABLES_SAVE} + +[Install] +WantedBy=multi-user.target