16 lines
448 B
Desktop File
16 lines
448 B
Desktop File
[Unit]
|
|
Description=Iptables Helper
|
|
After=network.target
|
|
|
|
[Service]
|
|
Environment="HOME=/root"
|
|
WorkingDirectory=/opt/iptables-helper
|
|
ExecStartPre=/bin/bash -c "[ -f /etc/iptables.rule ] && iptables-restore /etc/iptables.rule || exit 0;"
|
|
ExecStart=/opt/iptables-helper/iptables-helper
|
|
ExecStartPost=/bin/bash -c "iptables-save | tee /etc/iptables.rule > /dev/null"
|
|
Restart=on-failure
|
|
KillMode=process
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |