mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
Another fix to mdfind line in Mac scripts.
This commit is contained in:
parent
3482d836ae
commit
68ddba60a3
3 changed files with 7 additions and 6 deletions
|
@ -23,7 +23,7 @@ if [ $dryRun -gt 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zthome="/Library/Application Support/ZeroTier/One"
|
zthome="/Library/Application Support/ZeroTier/One"
|
||||||
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | sort | head -n 1`
|
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | grep -E '.+[.]app$' | sort | head -n 1`
|
||||||
if [ ! -d "$ztapp" ]; then
|
if [ ! -d "$ztapp" ]; then
|
||||||
ztapp="/Applications/ZeroTier One.app"
|
ztapp="/Applications/ZeroTier One.app"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
zthome="/Library/Application Support/ZeroTier/One"
|
zthome="/Library/Application Support/ZeroTier/One"
|
||||||
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$zthome"
|
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:$zthome"
|
||||||
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | sort | head -n 1`
|
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | grep -E '.+[.]app$' | sort | head -n 1`
|
||||||
|
|
||||||
# Clean all other stuff off the system if the user has trashed the .app
|
# Clean all other stuff off the system if the user has trashed the .app
|
||||||
if [ -z "$ztapp" -o ! -d "$ztapp" ]; then
|
if [ -z "$ztapp" -o ! -d "$ztapp" ]; then
|
||||||
|
@ -11,8 +11,9 @@ if [ -z "$ztapp" -o ! -d "$ztapp" ]; then
|
||||||
if [ ! -d "$ztapp" ]; then
|
if [ ! -d "$ztapp" ]; then
|
||||||
if [ -e "$zthome/uninstall.sh" ]; then
|
if [ -e "$zthome/uninstall.sh" ]; then
|
||||||
cd "$zthome"
|
cd "$zthome"
|
||||||
./uninstall.sh -q
|
nohup "$zthome/uninstall.sh" >>/tmp/ZeroTierOneUninstall.log 2>&1 &
|
||||||
exit
|
disown %1
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||||
|
|
||||||
zthome="/Library/Application Support/ZeroTier/One"
|
zthome="/Library/Application Support/ZeroTier/One"
|
||||||
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | sort | head -n 1`
|
ztapp=`mdfind kMDItemCFBundleIdentifier == 'com.zerotier.ZeroTierOne' | grep -E '.+[.]app$' | sort | head -n 1`
|
||||||
|
|
||||||
if [ "$UID" -ne 0 ]; then
|
if [ "$UID" -ne 0 ]; then
|
||||||
echo "Must be run as root; try: sudo $0"
|
echo "Must be run as root; try: sudo $0"
|
||||||
|
@ -50,7 +50,7 @@ fi
|
||||||
|
|
||||||
echo "Erasing service and support files..."
|
echo "Erasing service and support files..."
|
||||||
cd "$zthome"
|
cd "$zthome"
|
||||||
rm -rfv zerotier-one *.persist authtoken.secret identity.public *.log *.pid *.kext *.sh networks.d updates.d shutdownIfUnreadable
|
rm -rfv zerotier-one *.persist authtoken.secret identity.public *.log *.pid *.kext *.sh networks.d updates.d shutdownIfUnreadable pre10.8
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Add table
Reference in a new issue