Add an afterboot script.
This commit is contained in:
@@ -783,6 +783,22 @@
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
<key>GID</key>
|
||||
<integer>0</integer>
|
||||
<key>PATH</key>
|
||||
<string>/Users/j/OpenDNS/DNSCrypt/OSX/dnscrypt-osx-client/DNSCrypt-OSX-Installer/com.opendns.osx.DNSCryptAfterboot.plist</string>
|
||||
<key>PATH_TYPE</key>
|
||||
<integer>0</integer>
|
||||
<key>PERMISSIONS</key>
|
||||
<integer>420</integer>
|
||||
<key>TYPE</key>
|
||||
<integer>3</integer>
|
||||
<key>UID</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CHILDREN</key>
|
||||
<array/>
|
||||
|
||||
@@ -5,8 +5,8 @@ exec 2>/dev/null
|
||||
/bin/mkdir -p '/Library/Application Support/DNSCrypt/control'
|
||||
/bin/mkdir -p '/Library/Application Support/DNSCrypt/dnscrypt-proxy'
|
||||
/bin/mkdir -p '/Library/Application Support/DNSCrypt/probes'
|
||||
/bin/mkdir -p '/Library/Application Support/DNSCrypt/tickets'
|
||||
/bin/mkdir -p '/Library/Application Support/DNSCrypt/states'
|
||||
/bin/mkdir -p '/Library/Application Support/DNSCrypt/tickets'
|
||||
/usr/sbin/chown -R 0:0 '/Library/Application Support/DNSCrypt'
|
||||
/bin/chmod 710 '/Library/Application Support/DNSCrypt'
|
||||
|
||||
@@ -20,6 +20,7 @@ if [ $? != 0 ]; then
|
||||
fi
|
||||
|
||||
/bin/launchctl load -D local
|
||||
/bin/launchctl start com.opendns.osx.DNSCryptAfterboot
|
||||
/bin/launchctl start com.opendns.osx.DNSCryptConsoleChange
|
||||
/bin/launchctl start com.opendns.osx.DNSCryptControlChange
|
||||
/bin/launchctl start com.opendns.osx.DNSCryptNetworkChange
|
||||
|
||||
@@ -10,6 +10,7 @@ fi
|
||||
/bin/rm -f '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConfigUpdater.plist'
|
||||
/bin/rm -rf '/Library/Application Support/DNSCrypt Updater'
|
||||
|
||||
/bin/launchctl remove com.opendns.osx.DNSCryptAfterboot
|
||||
/bin/launchctl remove com.opendns.osx.DNSCryptConsoleChange
|
||||
/bin/launchctl remove com.opendns.osx.DNSCryptControlChange
|
||||
/bin/launchctl remove com.opendns.osx.DNSCryptNetworkChange
|
||||
|
||||
@@ -0,0 +1,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>Label</key>
|
||||
<string>com.opendns.osx.DNSCryptAfterboot</string>
|
||||
<key>KeepAlive</key>
|
||||
<false/>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/afterboot.sh</string>
|
||||
</array>
|
||||
<key>ExitTimeOut</key>
|
||||
<integer>300</integer>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>1</integer>
|
||||
<key>Nice</key>
|
||||
<integer>1</integer>
|
||||
<key>UserName</key>
|
||||
<string>root</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -14,7 +14,7 @@
|
||||
<array>
|
||||
<string>/Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/handle-console-change.sh</string>
|
||||
</array>
|
||||
<key>ExitTimeout</key>
|
||||
<key>ExitTimeOut</key>
|
||||
<integer>30</integer>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>0</integer>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<array>
|
||||
<string>/Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/handle-control-change.sh</string>
|
||||
</array>
|
||||
<key>ExitTimeout</key>
|
||||
<integer>30</integer>
|
||||
<key>ExitTimeOut</key>
|
||||
<integer>300</integer>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>0</integer>
|
||||
<key>Nice</key>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<array>
|
||||
<string>/Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/handle-network-change.sh</string>
|
||||
</array>
|
||||
<key>ExitTimeout</key>
|
||||
<integer>30</integer>
|
||||
<key>ExitTimeOut</key>
|
||||
<integer>300</integer>
|
||||
<key>ThrottleInterval</key>
|
||||
<integer>1</integer>
|
||||
<key>Nice</key>
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
|
||||
tickets_count=$(./get-tickets_count)
|
||||
[ "$tickets_count" != '0' ] && exit 0
|
||||
[ ! -e "$FALLBACK_FILE" ] && exit 0
|
||||
./check-network-change.sh || exit 0
|
||||
|
||||
if [ $1 != '--boot' ]; then
|
||||
[ ! -e "$FALLBACK_FILE" ] && exit 0
|
||||
./check-network-change.sh || exit 0
|
||||
fi
|
||||
|
||||
lockfile -1 -r 30 -l 60 "$HANDLERS_LOCK_FILE" || exit 1
|
||||
./set-dns-to-dhcp.sh
|
||||
|
||||
Reference in New Issue
Block a user