From 6b2355eac1d589ce04a776ac2871774b464d4e3c Mon Sep 17 00:00:00 2001 From: Michael <30936296+mtan93@users.noreply.github.com> Date: Tue, 20 Sep 2022 18:28:44 +0100 Subject: [PATCH] Update zerotier2.sh --- zerotier2.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/zerotier2.sh b/zerotier2.sh index 84fd6cc..0216d0a 100644 --- a/zerotier2.sh +++ b/zerotier2.sh @@ -43,15 +43,15 @@ echo "Status: Running the installer" >> ${deplog} installer -pkg /Library/Caches/com.purplecomputing.mdm/Apps/ZT.pkg -target / sleep 5 -# # Kill off the ZeroTier.app and then ZeroTier auth copy processes -# echo "Status: Killing Processes" >> ${logfile} -# echo "Status: Killing Processes" >> ${deplog} -# app-pid=$(ps aux | grep 'ZeroTier' | grep -v 'grep' | grep -v 'security' | awk '{print$2}') -# auth-pid=$(ps aux | grep 'ZeroTier' | grep 'security' | grep -v 'grep' | awk '{print$2}'); -# kill -9 $app-pid -# kill -9 $auth-pid -# #This sleep is functional and is needed to allow the processes to close properly before reopening the application -# sleep 5 +# Kill off the ZeroTier.app and then ZeroTier auth copy processes +echo "Status: Killing Processes" >> ${logfile} +echo "Status: Killing Processes" >> ${deplog} +app-pid=$(ps aux | grep 'ZeroTier' | grep -v 'grep' | grep -v 'security' | awk '{print$2}') +auth-pid=$(ps aux | grep 'ZeroTier' | grep 'security' | grep -v 'grep' | awk '{print$2}'); +kill -9 $app-pid +kill -9 $auth-pid +#This sleep is functional and is needed to allow the processes to close properly before reopening the application +sleep 5 # # Now start the ZeroTier.app again as user and we then only enter the admin credentials once # echo "Status: Re-opening ZeroTier" >> ${logfile}