mirror of
https://github.com/PurpleComputing/mdmscripts.git
synced 2026-02-03 06:03:26 +00:00
Update zerotier.sh
Added killing of ZT App and Security Prompts to allow silent operation during install.
This commit is contained in:
25
zerotier.sh
25
zerotier.sh
@@ -57,17 +57,36 @@ echo "Command: DeterminateManualStep: 1" >> $deplog
|
||||
|
||||
# Kill off the ZeroTier.app and then ZeroTier auth copy processes as the mdm root user manages network join
|
||||
echo "Status: Killing Processes" >> ${logfile}
|
||||
echo "Status: Killing Processes" >> ${deplog}
|
||||
echo "Killing Processes"
|
||||
|
||||
appPID=$(ps aux | grep 'ZeroTier' | grep -v 'grep' | grep -v 'security' | awk '{print$2}')
|
||||
authPID=$(ps aux | grep 'ZeroTier' | grep 'security' | grep -v 'grep' | awk '{print$2}');
|
||||
|
||||
IFS=$'\n'
|
||||
if [ -z "$appPID" ]
|
||||
then
|
||||
echo No ZT App Processes Found
|
||||
else
|
||||
echo ZT Processes Found. Killing...
|
||||
for item in $appPID
|
||||
do
|
||||
kill -9 $item
|
||||
pkill $item
|
||||
echo $item
|
||||
done
|
||||
kill -9 $authPID
|
||||
fi
|
||||
|
||||
if [ -z "$authPID" ]
|
||||
then
|
||||
echo No ZT Security Processes Found
|
||||
else
|
||||
echo ZT Security Processes Found. Killing...
|
||||
for item in $authPID
|
||||
do
|
||||
pkill $item
|
||||
echo $item
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
#This sleep is functional and is needed to allow the processes to close properly before reopening the application
|
||||
sleep 5
|
||||
|
||||
Reference in New Issue
Block a user