1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2024-12-13 17:36:27 +01:00
OpenVoiceOS/buildroot-external/package/wifi-ap/iptables.service

19 lines
508 B
Desktop File

[Unit]
Description=Packet Filtering Framework
Before=network-pre.target
Wants=network-pre.target
# check existence of configuration file
ConditionPathExists= /etc/wpa_supplicant/wpa_supplicant-ap0.conf
ConditionPathExists=!/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
[Service]
Type=oneshot
ExecStart=/sbin/iptables-restore /etc/iptables.rules
ExecReload=/sbin/iptables-restore /etc/iptables.rules
ExecStop=/usr/lib/systemd/scripts/iptables-flush
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target