#!/bin/bash
#
response=$(/usr/bin/osascript -e 'return button returned of (display dialog "首先需要卸载联软,才生效!你已经卸载了吗?" buttons ["是", "否"] default button 2)')
if [ $response = "是" ] ; then
sudo mv /Library/LaunchAgents/com.lvmagent.gui.plist /Library/LaunchAgents/com.lvmagent.gui.plist.disabled
sudo mv /Library/LaunchDaemons/com.lvmagent.core.plist /Library/LaunchDaemons/com.lvmagent.core.plist.disabled
sudo mv /Library/LaunchDaemons/com.lvmagent.screen.plist /Library/LaunchDaemons/com.lvmagent.screen.plist.disabled
(/usr/bin/osascript -e 'display dialog "重启电脑,才生效!" buttons {"OK"} default button "OK"')
else
(/usr/bin/osascript -e 'display dialog "请卸载联软,才生效!" buttons {"OK"} default button "OK"')
fi