Use absolute paths

This commit is contained in:
Frank Denis
2012-08-01 21:57:57 -07:00
parent 1db9d0e00e
commit e8a7f9988f
2 changed files with 21 additions and 11 deletions
@@ -2,22 +2,24 @@
exec 2>/dev/null
mkdir -p '/Library/Application Support/DNSCrypt/control'
mkdir -p '/Library/Application Support/DNSCrypt/dnscrypt-proxy'
mkdir -p '/Library/Application Support/DNSCrypt/probes'
mkdir -p '/Library/Application Support/DNSCrypt/states'
chown -R 0:0 '/Library/Application Support/DNSCrypt'
chmod 710 '/Library/Application Support/DNSCrypt'
/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/states'
/usr/sbin/chown -R 0:0 '/Library/Application Support/DNSCrypt'
/bin/chmod 710 '/Library/Application Support/DNSCrypt'
eval $(stat -s '/dev/console') || exit 1
wanted_uid="$st_uid"
chown -R "${wanted_uid}:0" '/Library/Application Support/DNSCrypt/control'
eval $(/usr/bin/stat -s '/dev/console')
if [ $? != 0 ]; then
wanted_uid="$st_uid"
/usr/sbin/chown -R "${wanted_uid}:0" '/Library/Application Support/DNSCrypt/control'
fi
/bin/launchctl load -D local
/bin/launchctl start com.opendns.osx.DNSCryptConsoleChange
/bin/launchctl start com.opendns.osx.DNSCryptControlChange
/bin/launchctl start com.opendns.osx.DNSCryptNetworkChange
touch '/Library/Application Support/DNSCrypt/control'
/usr/bin/touch '/Library/Application Support/DNSCrypt/control'
exit 0
@@ -2,10 +2,18 @@
exec 2>/dev/null
if [ -x /usr/bin/pkill ]; then
/usr/bin/pkill -f '/Applications/System Preferences.app'
fi
/bin/launchctl remove com.opendns.osx.DNSCryptConfigUpdater
/bin/rm -f '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConfigUpdater.plist'
/bin/rm -rf '/Library/Application Support/DNSCrypt Updater'
/bin/launchctl remove com.opendns.osx.DNSCryptConsoleChange
/bin/launchctl remove com.opendns.osx.DNSCryptControlChange
/bin/launchctl remove com.opendns.osx.DNSCryptNetworkChange
rm -f /var/run/dnscrypt*.lock
/bin/rm -f /var/run/dnscrypt*.lock
exit 0