MAC平台卸载dnscrypt的方法
生活随笔
收集整理的這篇文章主要介紹了
MAC平台卸载dnscrypt的方法
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
dnscrypt越來越不好用了,起不到應(yīng)用的作用還經(jīng)常自動重置DNS地址,干脆卸載算了。于是經(jīng)過一番搜索后找到了卸載的方法。
打開這個(gè)項(xiàng)目的git頁面:https://github.com/opendns/dnscrypt-osx-client
下載里邊的Apple腳本執(zhí)行就搞定了。
或者復(fù)制粘貼執(zhí)行下面的腳本,總之內(nèi)容都是一樣的。
set question to display dialog "Do you really want to uninstall DNSCrypt from this computer?" buttons {"Yes", "No"} default button "No" giving up after 10 set answer to button returned of questionif answer is equal to "Yes" thendo shell script "cd /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts ; /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/set-dns-to-dhcp.sh; pkill -f '/Applications/System Preferences.app';launchctl remove com.opendns.osx.DNSCryptMenuBar; launchctl remove com.opendns.osx.DNSCryptConfigUpdater; launchctl remove com.opendns.osx.DNSCryptAfterboot; launchctl remove com.opendns.osx.DNSCryptConsoleChange; launchctl remove com.opendns.osx.DNSCryptControlChange; launchctl remove com.opendns.osx.DNSCryptNetworkChange; rm -f /var/run/dnscrypt*; pkill dns-updater; pkill DNSCrypt-Menubar; sleep 5; for i in '/Library/LaunchDaemons/com.opendns.osx.DNSCryptAfterboot.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConsoleChange.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptControlChange.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptNetworkChange.plist' '/Library/LaunchAgents/com.opendns.osx.DNSCryptMenuBar.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConfigUpdater.plist' '/Applications/DNSCrypt-Menubar.app' '/Library/Application Support/DNSCrypt Updater' '/Library/Application Support/DNSCrypt' ~'/Library/Application Support/DNSCrypt Prefpane' '/Library/PreferencePanes/DNSCrypt.prefPane' '/usr/local/sbin/dnscrypt-proxy' '/usr/local/bin/alarmer' '/usr/local/bin/hostip' '/usr/local/share/man/man8/hostip.8' '/usr/local/share/man/man8/dnscrypt-proxy.8' '/usr/local/lib/dnscrypt-proxy' '/usr/local/share/dnscrypt-proxy' '/var/log/dnscrypt-query.log'; do rm -fr \"$i\"; done" with administrator privilegesdisplay alert "DNSCrypt has been sucessfully removed from this computer." end if
不過這個(gè)應(yīng)用的menu bar卻不一定會卸載掉,就像圖中這樣。
1.刪除Applications文件夾中的
2.刪除/Library/LaunchDaemons文件夾中的以下文件:
如果出現(xiàn)無法刪除的情況,刪除前先強(qiáng)制退出應(yīng)用。
總結(jié)
以上是生活随笔為你收集整理的MAC平台卸载dnscrypt的方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HTML5、CSS3实现旋转特效
- 下一篇: 如何利用 DITA 实现高效的跨部门内容