From 191d204674168d15a97277ba23098d6daf774dad Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 19 Dec 2013 10:51:46 -0800 Subject: [PATCH] Mac uninstall script fixes. --- .gitignore | 1 + ZeroTierUI/networkwidget.ui | 403 ++++++++++++++++-------------- ext/installfiles/mac/uninstall.sh | 23 +- 3 files changed, 230 insertions(+), 197 deletions(-) diff --git a/.gitignore b/.gitignore index 6a09d0861..aecb2fb2c 100755 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ mac-tap/tuntap/tap.kext /zt1-*-install /file2lz4c .qmake.stash +*.autosave diff --git a/ZeroTierUI/networkwidget.ui b/ZeroTierUI/networkwidget.ui index 8b2c51fbe..84c268298 100644 --- a/ZeroTierUI/networkwidget.ui +++ b/ZeroTierUI/networkwidget.ui @@ -40,28 +40,7 @@ - - - 0 - 0 - - - - - QFormLayout::ExpandingFieldsGrow - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::AlignHCenter|Qt::AlignTop - - - 6 - - - 2 - + 0 @@ -74,29 +53,97 @@ 0 - - + + + + + 0 + 0 + + + + + 15 + + + + background-color: rgba(0,0,0,25); +padding: 0.25em; +margin: 0; + - Network ID: + networkname Qt::PlainText + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + Qt::NoTextInteraction + - - - - - 75 - true - + + + + + 0 + 0 + - - Click to copy network ID to clipboard. - - - QPushButton { + + + QFormLayout::ExpandingFieldsGrow + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + Qt::AlignHCenter|Qt::AlignTop + + + 6 + + + 2 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Network ID: + + + Qt::PlainText + + + + + + + + 75 + true + + + + Click to copy network ID to clipboard. + + + QPushButton { border: 0; padding: 0; margin: 0; @@ -112,135 +159,27 @@ QPushButton:hover { background-color: rgba(0,0,0,25); } - - - 0000000000000000 - - - true - - - - - - - Name: - - - Qt::PlainText - - - - - - - - 75 - true - - - - ? - - - Qt::PlainText - - - - - - - Type: - - - Qt::PlainText - - - - - - - - 75 - true - - - - ? - - - Qt::PlainText - - - - - - - Status: - - - Qt::PlainText - - - - - - - Device: - - - Qt::PlainText - - - - - - - - 75 - true - - - - ? - - - Qt::PlainText - - - - - - - - 0 - 0 - - - - - 12 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - + + 0000000000000000 + + + true + + + + + + + Type: + + + Qt::PlainText + + + + + 75 @@ -255,39 +194,124 @@ QPushButton:hover { - - - - - 0 - 0 - - - - - 8 - - + + - (configuration is 0 seconds old) + Status: Qt::PlainText - - - - Qt::Horizontal + + + + + 0 + 0 + - - - 40 - 1 - + + + 12 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 75 + true + + + + ? + + + Qt::PlainText + + + + + + + + 0 + 0 + + + + + 8 + + + + (configuration is 0 seconds old) + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 1 + + + + + + + + + + + Device: - + + Qt::PlainText + + + + + + + + 75 + true + + + + ? + + + Qt::PlainText + + @@ -455,7 +479,6 @@ QListWidget:hover { - networkIdPushButton ipListWidget leaveNetworkButton diff --git a/ext/installfiles/mac/uninstall.sh b/ext/installfiles/mac/uninstall.sh index b9563a112..626db73f6 100755 --- a/ext/installfiles/mac/uninstall.sh +++ b/ext/installfiles/mac/uninstall.sh @@ -10,11 +10,20 @@ if [ "$UID" -ne 0 ]; then exit 1 fi -echo +# Run with -q to be quieter and run without delay +quickAndQuiet=0 +if [ "$1" = "-q" ]; then + quickAndQuiet=1 + echo() { :; } +fi -echo "This will uninstall ZeroTier One, hit CTRL+C to abort." -echo "Waiting 5 seconds..." -sleep 5 +echo + +if [ $quickAndQuiet -eq 0 ]; then + echo "This will uninstall ZeroTier One, hit CTRL+C to abort." + echo "Waiting 5 seconds..." + sleep 5 +fi echo "Unloading and removing LaunchDaemons item..." launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist @@ -27,11 +36,11 @@ killall -KILL zerotier-one >>/dev/null 2>&1 sleep 1 echo "Unloading kernel extension..." -kextunload "$ztpath/tap.kext" +kextunload "$ztpath/tap.kext" >>/dev/null 2>&1 echo "Erasing UI app, binary, and support files..." -cd $ztpath -rm -rfv "$ztapp" zerotier-one *.persist authtoken.secret identity.public *.log *.pid *.kext *.sh +cd "$ztpath" +rm -rfv "$ztapp" zerotier-one *.persist authtoken.secret identity.public *.log *.pid *.kext *.sh networks.d updates.d shutdownIfUnreadable echo "Done." echo