summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-01-08 23:35:26 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-01-08 23:35:26 -0800
commit68ddba60a3668d817ef0419cddd1e7c35388ecfb (patch)
tree24dc52b8276160f83228efc112694a100bb5a0ec
parent3482d836ae20db67a136795b9495a9f4ffcde934 (diff)
downloadinfinitytier-68ddba60a3668d817ef0419cddd1e7c35388ecfb.tar.gz
infinitytier-68ddba60a3668d817ef0419cddd1e7c35388ecfb.zip
Another fix to mdfind line in Mac scripts.
-rw-r--r--ext/installfiles/mac/install.tmpl.sh2
-rwxr-xr-xext/installfiles/mac/launch.sh7
-rwxr-xr-xext/installfiles/mac/uninstall.sh4
3 files changed, 7 insertions, 6 deletions
diff --git a/ext/installfiles/mac/install.tmpl.sh b/ext/installfiles/mac/install.tmpl.sh
index e65e71c1..4fa7b0c7 100644
--- a/ext/installfiles/mac/install.tmpl.sh
+++ b/ext/installfiles/mac/install.tmpl.sh
@@ -23,7 +23,7 @@ if [ $dryRun -gt 0 ]; then
fi
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
ztapp="/Applications/ZeroTier One.app"
fi
diff --git a/ext/installfiles/mac/launch.sh b/ext/installfiles/mac/launch.sh
index 371b3f5d..9a48568d 100755
--- a/ext/installfiles/mac/launch.sh
+++ b/ext/installfiles/mac/launch.sh
@@ -2,7 +2,7 @@
zthome="/Library/Application Support/ZeroTier/One"
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
if [ -z "$ztapp" -o ! -d "$ztapp" ]; then
@@ -11,8 +11,9 @@ if [ -z "$ztapp" -o ! -d "$ztapp" ]; then
if [ ! -d "$ztapp" ]; then
if [ -e "$zthome/uninstall.sh" ]; then
cd "$zthome"
- ./uninstall.sh -q
- exit
+ nohup "$zthome/uninstall.sh" >>/tmp/ZeroTierOneUninstall.log 2>&1 &
+ disown %1
+ exit 0
fi
fi
fi
diff --git a/ext/installfiles/mac/uninstall.sh b/ext/installfiles/mac/uninstall.sh
index d1e9a513..c2219a98 100755
--- a/ext/installfiles/mac/uninstall.sh
+++ b/ext/installfiles/mac/uninstall.sh
@@ -3,7 +3,7 @@
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
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
echo "Must be run as root; try: sudo $0"
@@ -50,7 +50,7 @@ fi
echo "Erasing service and support files..."
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