16 lines
434 B
Desktop File
16 lines
434 B
Desktop File
[Unit]
|
|
Description=Iptables Helper
|
|
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;"
|
|
ExecStart=/opt/iptables-helper/iptables-helper
|
|
ExecStartPost=sh -c "iptables-save | tee /etc/iptables.rule > /dev/null"
|
|
Restart=on-failure
|
|
KillMode=process
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |