更新服务配置文件

This commit is contained in:
zxb 2023-11-06 16:01:45 +08:00
parent 3e33c2ba79
commit d04ca92e60

View File

@ -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