From d04ca92e6066c745ddf31823a014784eea0272a3 Mon Sep 17 00:00:00 2001 From: zxb <919411476@qq.com> Date: Mon, 6 Nov 2023 16:01:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9C=8D=E5=8A=A1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iptables-helper.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iptables-helper.service b/iptables-helper.service index 30472d2..513e5a9 100644 --- a/iptables-helper.service +++ b/iptables-helper.service @@ -5,9 +5,9 @@ After=network.target [Service] Environment="HOME=/root" WorkingDirectory=/opt/iptables-helper -ExecStartPre=sh -c "[ -f /etc/iptables.rule ] && iptables-restore /etc/iptables.rule || exit 0;" +ExecStartPre=/bin/bash -c "[ -f /etc/iptables.rule ] && iptables-restore /etc/iptables.rule || exit 0;" ExecStart=/opt/iptables-helper/iptables-helper -ExecStartPost=sh -c "iptables-save | tee /etc/iptables.rule > /dev/null" +ExecStartPost=/bin/bash -c "iptables-save | tee /etc/iptables.rule > /dev/null" Restart=on-failure KillMode=process RestartSec=5s