-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathnet.openbsd.pf.plist
26 lines (26 loc) · 1009 Bytes
/
net.openbsd.pf.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<string>false</string>
<key>Label</key>
<string>net.openbsd.pf</string>
<key>WorkingDirectory</key>
<string>/var/run</string>
<key>Program</key>
<string>/bin/bash</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>for tt in {1..4}; do if [[ `/sbin/ifconfig | /opt/local/bin/pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active' | /usr/bin/egrep -o -m 1 '^[^\t:]+'` = '' ]]; then /bin/sleep 45; else /sbin/pfctl -Fall && /sbin/pfctl -ef /etc/pf.conf; break; fi; done</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/var/log/pf.log</string>
<key>StandardOutPath</key>
<string>/var/log/pf.log</string>
</dict>
</plist>