-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAssemble-Template
593 lines (490 loc) · 21.9 KB
/
Assemble-Template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
#!/bin/bash
#
# Author : Perry Driscoll - https://github.com/PezzaD84
# Created : 28/9/2022
# Updated : 4/9/2024
# Version : v2.2
#
#########################################################################################
# Description:
# Script to provision devices using swiftdialog <https://github.com/bartreardon/swiftDialog>
#
#########################################################################################
# Copyright © 2023 Perry Driscoll <https://github.com/PezzaD84>
#
# This file is free software and is shared "as is" without any warranty of
# any kind. The author gives unlimited permission to copy and/or distribute
# it, with or without modifications, as long as this notice is preserved.
# All usage is at your own risk and in no event shall the authors or
# copyright holders be liable for any claim, damages or other liability.
#########################################################################################
#########################################################################################
# Grab currently logged in user
#########################################################################################
CURRENT_USER=$(ls -l /dev/console | awk '{ print $3 }')
#########################################################################################
# Add your custom settings here.
# orgLogo is recommended to be a png or jpeg
# banner is recommended to be a png or jpeg at 850x150
#########################################################################################
# Organisation logo
orgLogo=""
# Banner image e.g. company name
banner=""
# Welcome message to display to users to inform them of what is happening
welcomeMessage="Welcome to your new mac $CURRENT_USER! \n\n We will now run through some basic configuration and install some common apps to help get you up and running. \n\n Sit back and have a break while we get things ready."
# Small text box which can include extra info
infoText="TEST INFO MESSAGE \n\n This is a place holder to test the extra info box"
# Text to display in the help menu
helpText="TEST HELP MESSAGE \n\n This is a place holder to test the help message."
#########################################################################################
# Policy array
# Format must be as follows:
# "Application Name,JAMF Trigger,Icon Hash" - how to find the hash can be found here https://vimeo.com/772998915 (thanks to Dan Snelson)
#########################################################################################
array=(
"Google Chrome,installChrome2,fb48e96c34d449ef5ff0d56e983a034927320195be69a02c076b6270a4e19d54"
"Slack,installSlack,4c854db5ebeed437a6c7bf34cfb01fc4631ace8a339183f78d94adef74bbab1f"
"Atom,installAtom,e4bcac54cc087b73724bc958df90682b5b68064d4760713e3135da722f9d8845"
"zoom,installZoom,89c52ab16cabcc11aa955521b7589955e8ea2995f250f4b65356a46653bd734b"
"Spotify,installSpotify2,7be69c3635be12e83e7e69c2c648e3ace478dea8d21b9db851a65e70e84acc5f"
"Final Config,finalConfig,3b0765f097a797e05d960186b475375ce5953b7d09f9bd98584c3bb14cae2065"
)
#########################################################################################
# Test mode
# If set to true no policies will run, only the application list will be populated
# Set to true by default
#########################################################################################
TESTING="true"
#########################################################################################
# Extra info
# If set to true the user will be prompted to enter an Asset Tag, Email address and User name.
# Set to false by default
#########################################################################################
EXTRAINFO="true"
# If extra info is turned on you can set the device name to be the same as the Asset Tag. False by default.
AssetToName="false"
#########################################################################################
#########################################################################################
###### !!TRY NOT TO EDIT BELOW HERE OR THE WHOLE THING MIGHT EXPLODE!! ######
#########################################################################################
#########################################################################################
#########################################################################################
# Variables
#########################################################################################
jamfBinary="/usr/local/bin/jamf"
commandLog="/Users/Shared/.ASMBL/Logs/DialogCommand.log"
AssembleLog="/Users/Shared/.ASMBL/Logs/Assemble.log"
PolicyLog="/Users/Shared/.ASMBL/Logs/policy.log"
#########################################################################################
# Functions
#########################################################################################
DialogInstall(){
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Will not install Dialog." | tee -a $AssembleLog
else
pkgfile="SwiftDialog.pkg"
logfile="/Library/Logs/SwiftDialogInstallScript.log"
URL="https://github.com$(curl -sfL "$(curl -sfL "https://github.com/bartreardon/swiftDialog/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1)" | tr '"' "\n" | grep -i "^/.*\/releases\/download\/.*\.pkg" | head -1)"
# Start Log entries
echo "--" >> ${logfile}
echo "`date`: Downloading latest version." >> ${logfile}
# Download installer
curl -s -L -J -o /tmp/${pkgfile} ${URL}
echo "`date`: Installing..." >> ${logfile}
# Change to installer directory
cd /tmp
# Install application
sudo installer -pkg ${pkgfile} -target /
sleep 5
echo "`date`: Deleting package installer." >> ${logfile}
# Remove downloaded installer
rm /tmp/"${pkgfile}"
fi
}
pauseJamfFramework(){
## Update Jamf frameworks
/usr/local/bin/jamf manage
## Disable Jamf Check-Ins
jamftasks=($( find /Library/LaunchDaemons -iname "*task*" -type f -maxdepth 1 ))
for ((i=0;i<${#jamftasks[@]};i++))
do
/bin/launchctl unload -w "${jamftasks[$i]}"
done
## Kill any check-in in progress
jamfpid=$( ps -ax | grep "jamf policy -randomDelaySeconds" | grep -v "grep" | awk '{ print $1 }' )
if [ "$jamfpid" != "" ];
then
kill -9 "$jamfpid"
fi
}
restartJamfFramework(){
## Re-enable Jamf management
for ((i=0;i<${#jamftasks[@]};i++))
do
/bin/launchctl load -w "${jamftasks[$i]}"
done
}
#########################################################################################
# Create Master Assemble Log
#########################################################################################
if [ -f $AssembleLog ]; then
echo "______________________________________________________________________" | tee -a $AssembleLog
echo "######## ASSEMBLE RUN ON: `date +%d.%m.%Y:%T` ########" | tee -a $AssembleLog
echo "Assemble master log already exists. Continuing to assemble...." | tee -a $AssembleLog
sleep 3
else
echo "______________________________________________________________________" | tee -a $AssembleLog
echo "######## ASSEMBLE RUN ON: `date +%d.%m.%Y:%T` ########" | tee -a $AssembleLog
echo "Assemble has not run before. Creating master log now...." | tee -a $AssembleLog
mkdir -p /Users/Shared/.ASMBL/Logs/
sleep 3
fi
#########################################################################################
# Check Dock is running before starting
#########################################################################################
DOCK_STATUS=$(pgrep -x Dock)
while [[ "$DOCK_STATUS" == "" ]]; do
echo "Dock not running yet... please wait..." | tee -a $AssembleLog
sleep 3
DOCK_STATUS=$(pgrep -x Dock)
done
echo "Dock is running as process $DOCK_STATUS. Starting assemble....." | tee -a $AssembleLog
sleep 3
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Will not Pause JAMF Agent" | tee -a $AssembleLog
else
echo "Pausing JAMF Agent while build proceeds....." | tee -a $AssembleLog
pauseJamfFramework
fi
#########################################################################################
# Install Rosetta if device is running Apple Silicon
#########################################################################################
processor=$(uname -m)
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Will not install Rosetta." | tee -a $AssembleLog
else
if [[ $processor == arm64 ]]; then
echo "Mac is arm64. Installing Rosetta....." | tee -a $AssembleLog
echo A | sudo softwareupdate --install-rosetta
Sleep 5
echo "Rosetta Installed. Continuing Build....." | tee -a $AssembleLog
else
echo "Mac is Intel. Continuing Build....." | tee -a $AssembleLog
fi
fi
##############################################################
# Check if SwiftDialog is installed (SwiftDialog created by Bart Reardon https://github.com/bartreardon/swiftDialog)
##############################################################
if ! command -v dialog &> /dev/null
then
echo "SwiftDialog is not installed. App will be installed now....." | tee -a $AssembleLog
sleep 2
DialogInstall
else
echo "SwiftDialog is installed. Checking installed version....." | tee -a $AssembleLog
installedVersion=$(dialog -v | sed 's/./ /6' | awk '{print $1}')
latestVersion=$(curl -sfL "https://github.com/bartreardon/swiftDialog/releases/latest" | tr '"' "\n" | grep -i "expanded_assets" | head -1 | tr '/' ' ' | awk '{print $7}' | tr -d 'v' | awk -F '-' '{print $1}')
if [[ $installedVersion != $latestVersion ]]; then
echo "Dialog needs updating" | tee -a $AssembleLog
DialogInstall
else
echo "Dialog is up to date. Continuing to assemble...." | tee -a $AssembleLog
fi
sleep 3
fi
#########################################################################################
# Check if assemble command file exists
#########################################################################################
if [ -f $commandLog ]; then
echo "Assemble command file found. Continuing to assemble...." | tee -a $AssembleLog
sleep 3
else
echo "Assemble has not run before. Creating command file now...." | tee -a $AssembleLog
mkdir -p /Users/Shared/.ASMBL/Logs/
sleep 3
fi
#########################################################################################
# Dialog window for Start message
#########################################################################################
progressTotal=${#array[@]}
if [[ "$banner" == "" ]]; then
dialog \
--presentation \
--button1disabled \
--title Assemble \
--position centre \
--icon "$orgLogo" \
--message "$welcomeMessage" \
--height 500 \
--alignment centre \
--messagefont 'name=Arial,size=16' \
--blurscreen \
--progress \
--commandfile $commandLog \
--infobox "$infoText" \
--helpmessage "$helpText" &
sleep 10
if [[ $EXTRAINFO =~ ^[tT]rue$ ]]; then
echo "EXTRA INFO SWITCHED ON. Continuing to gather Email, Username and Asset Tag...." | tee -a $AssembleLog
asset=$(dialog \
--title Assemble \
--position centre \
--icon "$orgLogo" \
--message "$welcomeMessage\n\nPlease enter the extra information required below." \
--height 500 \
--alignment center \
--blurscreen \
--messagefont 'name=Arial,size=16' \
--infobox "$infoText" \
--helpmessage "$helpText" \
--textfield "Email Address:",required,prompt="username@company.com" \
--textfield "User Name:",required,prompt="User Name" \
--textfield "Asset Tag:",required,prompt="#######" \
--json)
email=$(echo $asset | awk -F '"Email Address:" : "' '{print$2}' | awk -F '"' '{print$1}')
user=$(echo $asset | awk -F '"User Name:" : "' '{print$2}' | awk -F '"' '{print$1}')
assetTag=$(echo $asset | awk -F '"Asset Tag:" : "' '{print$2}' | awk -F '"' '{print$1}')
echo "Email is: $email" | tee -a $AssembleLog
echo "User name is: $user" | tee -a $AssembleLog
echo "Asset Tag is: $assetTag" | tee -a $AssembleLog
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Inventory will not be updated." | tee -a $AssembleLog
else
echo "Updating device inventory." | tee -a $AssembleLog
$jamfBinary recon -email $email
$jamfBinary recon -endUsername $user
$jamfBinary recon -assetTag "$assetTag"
fi
# Name Device the same as the asset tag
if [[ $AssetToName =~ ^[tT]rue$ ]]; then
echo "ASSET TO NAME IS SWITCHED ON. Setting device name to asset tag...." | tee -a $AssembleLog
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Device name will not be updated." | tee -a $AssembleLog
else
/usr/sbin/scutil --set ComputerName "$assetTag"
/usr/sbin/scutil --set LocalHostName "$assetTag"
/usr/sbin/scutil --set HostName "$assetTag"
dscacheutil -flushcache
echo "Computer name has been set..." | tee -a $AssembleLog
echo "`scutil --get ComputerName`" | tee -a $AssembleLog
fi
fi
else
echo "EXTRA INFO IS SWITCHED OFF." | tee -a $AssembleLog
fi
else
dialog \
--presentation \
--button1disabled \
--title none \
--position centre \
--bannerimage "$banner" \
--icon "$orgLogo" \
--message "$welcomeMessage" \
--height 500 \
--alignment centre \
--messagefont 'name=Arial,size=16' \
--blurscreen \
--progress \
--commandfile $commandLog \
--infobox "$infoText" \
--helpmessage "$helpText" &
sleep 10
if [[ $EXTRAINFO =~ ^[tT]rue$ ]]; then
echo "EXTRA INFO SWITCHED ON. Continuing to gather Email, Username and Asset Tag...." | tee -a $AssembleLog
asset=$(dialog \
--title none \
--position centre \
--bannerimage "$banner" \
--icon "$orgLogo" \
--message "$welcomeMessage\n\nPlease enter the extra information required below." \
--height 500 \
--alignment center \
--blurscreen \
--messagefont 'name=Arial,size=16' \
--infobox "$infoText" \
--helpmessage "$helpText" \
--textfield "Email Address:",required,prompt="username@company.com" \
--textfield "User Name:",required,prompt="User Name" \
--textfield "Asset Tag:",required,prompt="#######" \
--json)
email=$(echo $asset | awk -F '"Email Address:" : "' '{print$2}' | awk -F '"' '{print$1}')
user=$(echo $asset | awk -F '"User Name:" : "' '{print$2}' | awk -F '"' '{print$1}')
assetTag=$(echo $asset | awk -F '"Asset Tag: FT-MW" : "' '{print$2}' | awk -F '"' '{print$1}')
echo "Email is: $email" | tee -a $AssembleLog
echo "User name is: $user" | tee -a $AssembleLog
echo "Asset Tag is: FT-MW$assetTag" | tee -a $AssembleLog
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Inventory will not be updated." | tee -a $AssembleLog
else
echo "Updating device inventory." | tee -a $AssembleLog
$jamfBinary recon -email $email
$jamfBinary recon -endUsername $user
$jamfBinary recon -assetTag "$assetTag"
# Name Device the same as the asset tag
if [[ $AssetToName =~ ^[tT]rue$ ]]; then
/usr/sbin/scutil --set ComputerName "$assetTag"
/usr/sbin/scutil --set LocalHostName "$assetTag"
/usr/sbin/scutil --set HostName "$assetTag"
dscacheutil -flushcache
echo "Computer name has been set..." | tee -a $AssembleLog
echo "`scutil --get ComputerName`" | tee -a $AssembleLog
fi
fi
else
echo "EXTRA INFO IS SWITCHED OFF." | tee -a $AssembleLog
fi
fi
#########################################################################################
# Caffinate Dialog process
#########################################################################################
dialogPID=$(pgrep -x Dialog)
caffeinate -disu -w $dialogPID &
#########################################################################################
# Dialog window update with list of apps
#########################################################################################
echo "message: Your mac is now being provisioned with the following settings and applications." >> $commandLog
echo "progresstext: Starting Installation...." >> $commandLog
echo "list: " >> $commandLog
echo "listitem: delete, index: 0" >> $commandLog
echo "height: 600" >> $commandLog
progressTotal=${#array[@]}
sleep 2
for appStatus in "${array[@]}"; do
hash=$(echo $appStatus | cut -d ',' -f3)
hashCheck=$(curl -s https://ics.services.jamfcloud.com/icon/hash_$hash | grep "AccessDenied")
if [[ $hashCheck == "" ]]; then
hashURL="https://ics.services.jamfcloud.com/icon/hash_"
else
hashURL="https://euw2.ics.services.jamfcloud.com/icon/hash_"
fi
echo "listitem: add, title: $(echo $appStatus | cut -d ',' -f1), icon: $hashURL$(echo $appStatus | cut -d ',' -f3), status: pending, statustext: pending" >> $commandLog
done
sleep 5
step=$(echo 100/$progressTotal | bc -l)
echo "Installation process started at `date +%T`" | tee -a $AssembleLog
echo "Initial ProgressTotal: $progressTotal"
echo "Incremental Step: $step"
#########################################################################################
# Application installation
#########################################################################################
progressStep=1
until [ $progressStep -gt $progressTotal ]; do
for appName in "${array[@]}"; do
echo "listitem: title: $(echo $appName | cut -d ',' -f1), status: wait, statustext: installing" >> $commandLog
echo "progress: increment $step" >> $commandLog
echo "progresstext: Installing $(echo $appName | cut -d ',' -f1)...." >> $commandLog
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. $(echo $appName | cut -d ',' -f1) will not be installed." | tee -a $AssembleLog
else
echo "Applications........ ASSEMBLE!" | tee -a $AssembleLog
echo "Installing $(echo $appName | cut -d ',' -f1)" | tee -a $AssembleLog
$jamfBinary policy -event $(echo $appName | cut -d ',' -f2) -forceNoRecon > $PolicyLog
fi
sleep 1
appFailed=$(cat $PolicyLog | grep "Installation failed")
appInstalled=$(cat $PolicyLog | grep "Successfully installed")
scriptInstalled=$(cat $PolicyLog | grep "code: 0")
scriptFailed=$(cat $PolicyLog | grep "code: 1")
dmgInstalled=$(cat $PolicyLog | grep "verbose: Installing")
commandRan=$(cat $PolicyLog | grep "Result of command:")
sleep 1
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. No App validation" | tee -a $AssembleLog
echo "listitem: title: $(echo $appName | cut -d ',' -f1), status: error, statustext: installed" >> $commandLog
echo "progresstext: TESTING $(echo $appName | cut -d ',' -f1)" >> $commandLog
else
if [[ $appInstalled =~ . ]] || [[ $scriptInstalled =~ . ]] || [[ $commandRan =~ . ]] || [[ $dmgInstalled =~ . ]]; then
echo "$(echo $appName | cut -d ',' -f1) Installed" | tee -a $AssembleLog
echo "listitem: title: $(echo $appName | cut -d ',' -f1), status: success, statustext: installed" >> $commandLog
echo "progresstext: Installed $(echo $appName | cut -d ',' -f1)" >> $commandLog
sleep 4
fi
if [[ $appFailed =~ . ]] || [[ $scriptFailed =~ . ]]; then
echo "$(echo $appName | cut -d ',' -f1) failed to install" | tee -a $AssembleLog
echo "listitem: title: $(echo $appName | cut -d ',' -f1), status: fail, statustext: Failed" >> $commandLog
echo "progresstext: Failed to install $(echo $appName | cut -d ',' -f1)" >> $commandLog
sleep 4
fi
if [[ $appInstalled == "" ]] && [[ $scriptInstalled == "" ]] && [[ $appFailed == "" ]] && [[ $scriptFailed == "" ]] && [[ $commandRan == "" ]] && [[ $dmgInstalled == "" ]]; then
echo "$(echo $appName | cut -d ',' -f1) failed to install" | tee -a $AssembleLog
echo "listitem: title: $(echo $appName | cut -d ',' -f1), status: error, statustext: Error" >> $commandLog
echo "progresstext: Error with install $(echo $appName | cut -d ',' -f1)" >> $commandLog
echo "There was an error with the installation. Please refer to the logs." | tee -a $AssembleLog
sleep 4
fi
fi
let "progressStep+=1"
sleep 2
echo "ProgressStep: $progressStep"
echo "ProgressTotal: $progressTotal"
done
done
sleep 2
echo "progresstext: Setup Complete!" >> $commandLog
sleep 2
echo "Installation Finished at `date +%T`" | tee -a $AssembleLog
#########################################################################################
# Dialog message to show completion
#########################################################################################
# Check to see if FileVault Deferred enablement is active - do not edit below
FV_DEFERRED_STATUS=$(fdesetup status | grep "Deferred" | cut -d ' ' -f6)
# Logic to log user out if FileVault is detected. Otherwise, app will close.
if [[ "$FV_DEFERRED_STATUS" = "active" ]]; then
echo "Filevault is in deferred mode. User must log out and log in." | tee -a $AssembleLog
if [[ "$banner" == "" ]]; then
dialog \
--title Assemble \
--position centre \
--icon "$orgLogo" \
--height 500 \
--alignment centre \
--message "Setup Complete! \n\n $CURRENT_USER you are now all set and ready to go. Please click Logout to finish encrypting your device." \
--messagefont 'name=Arial,size=16' \
--blurscreen \
--button1text Logout \
--button1shellaction "launchctl bootout user/$(id -u $CURRENT_USER)" &
else
dialog \
--title none \
--bannerimage "$banner" \
--position centre \
--icon "$orgLogo" \
--height 500 \
--alignment centre \
--message "Setup Complete! \n\n $CURRENT_USER you are now all set and ready to go. Please click Logout to finish encrypting your device." \
--messagefont 'name=Arial,size=16' \
--blurscreen \
--button1text Logout \
--button1shellaction "launchctl bootout user/$(id -u $CURRENT_USER)" &
fi
sleep 2
echo "quit:" >> $commandLog
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Final Inventory update will not happen." | tee -a $AssembleLog
else
echo "Final device inventory update." | tee -a $AssembleLog
$jamfBinary recon
echo "Restarting JAMF Agent....." | tee -a $AssembleLog
restartJamfFramework
fi
sleep 60
exit 0
else
echo "height: 500" >> $commandLog
echo "list: clear" >> $commandLog
echo "message: Setup Complete! \n\n $CURRENT_USER you are now all set and ready to go. Please click finish." >> $commandLog
echo "button1: enable" >> $commandLog
echo "button1text: Finish" >> $commandLog
if [[ $TESTING =~ ^[tT]rue$ ]]; then
echo "TEST MODE ENABLED. Final Inventory will not be updated." | tee -a $AssembleLog
else
echo "Final device inventory update." | tee -a $AssembleLog
$jamfBinary recon
echo "Restarting JAMF Agent....." | tee -a $AssembleLog
restartJamfFramework
fi
sleep 60
exit 0
fi