#!/bin/bash # WebPhone NS engine uninstall script for MacOS # Copyright MizuTech SRL. All rights reserved. NSINSTALLERDIR=$(cd `dirname $0` && pwd) #test sudo rights echo "Uninstalling WebPhone NS engine ... " sudo echo "" || { echo "Please run again as root!"; sudo osascript -e 'display notification "" with title "No uninstall rights. Run again as admin!" subtitle "You don not have enough rights to install. Please run this app again as admin or root user."'; exit 11 ; } ; sudo osascript -e 'display notification "" with title "WebPhone NS Uninstalling..." subtitle "NS engine uninstall in progress. Please wait..."' echo "Uninstalling..." sudo launchctl unload WebPhone_NS sudo launchctl unload /Applications/WebPhone_NS/WebPhone_NS sudo launchctl remove WebPhone_NS sudo launchctl remove /Applications/WebPhone_NS/WebPhone_NS sudo pkill -x WebPhone_NS sudo pkill -x WebPhone_Service sudo pkill -x WebPhone_NS sudo /Applications/WebPhone_NS/WebPhone_NS /uninstall sudo pkill -x WebPhone_NS sudo pkill -x WebPhone_NS sudo rm -rf /Applications/WebPhone_NS/mwphonedata sudo rm -f /Applications/WebPhone_NS/WebPhone_NS.stderr.log echo "WebPhone NS engine uninstalled successfully." sudo osascript -e 'display notification "" with title "WebPhone NS engine uninstalled" subtitle "NS engine uninstall finished"' exit 0