@@ -31,6 +31,7 @@ osvers=$(sw_vers -productVersion | awk -F. '{print $2}') # Thanks Rich Trouton
3131webstatus=$( serveradmin status web | awk ' {print $3}' ) # Thanks Charles Edge
3232AUTOPKGRUN=" AdobeFlashPlayer.munki AdobeReader.munki Dropbox.munki Firefox.munki GoogleChrome.munki OracleJava7.munki TextWrangler.munki munkitools2.munki MakeCatalogs.munki"
3333DEFAULTS=" /usr/bin/defaults"
34+ AUTOPKG=" /usr/local/bin/autopkg"
3435MAINPREFSDIR=" /Library/Preferences"
3536ADMINUSERNAME=" ladmin"
3637SCRIPTDIR=" /usr/local/bin"
@@ -290,7 +291,7 @@ echo "AutoPkg Installed"
290291
291292${DEFAULTS} write com.github.autopkg MUNKI_REPO " $REPODIR "
292293
293- autopkg repo-add http://github.com/autopkg/recipes.git
294+ ${AUTOPKG} repo-add http://github.com/autopkg/recipes.git
294295
295296${DEFAULTS} write com.googlecode.munki.munkiimport editor " ${TEXTEDITOR} "
296297${DEFAULTS} write com.googlecode.munki.munkiimport repo_path " ${REPODIR} "
@@ -313,7 +314,7 @@ plutil -convert xml1 ~/Library/Preferences/com.googlecode.munki.munkiimport.plis
313314# Get some Packages and Stuff them in Munki
314315# ###
315316
316- autopkg run -v ${AUTOPKGRUN}
317+ ${AUTOPKG} run -v ${AUTOPKGRUN}
317318
318319${LOGGER} " AutoPkg Run"
319320echo " AutoPkg has run"
351352# Install AutoPkgr from the awesome Linde Group!
352353# ###
353354
354- autopkg repo-add rtrouton-recipes
355+ ${AUTOPKG} repo-add rtrouton-recipes
355356
356- autopkg run AutoPkgr.install
357+ ${AUTOPKG} run AutoPkgr.install
357358
358359${LOGGER} " AutoPkgr Installed"
359360echo " AutoPkgr Installed"
@@ -378,9 +379,9 @@ chown -R $ADMINUSERNAME /Users/$ADMINUSERNAME/Library/Application\ Support/AutoP
378379# Install Munki Admin App by the amazing Hannes Juutilainen
379380# ###
380381
381- autopkg repo-add jleggat-recipes
382+ ${AUTOPKG} repo-add jleggat-recipes
382383
383- autopkg run MunkiAdmin.install
384+ ${AUTOPKG} run MunkiAdmin.install
384385
385386# ###
386387# Install Munki Enroll
@@ -440,17 +441,19 @@ ${MANU} add-pkg munkireport --manifest site_default
440441# ###
441442
442443# Give the owner rights to the repo again, just in case we missed something along the way...
443- chmod -R a+rX,g+w " ${REPONAME} " # # Thanks Arek!
444- chown -R ${ADMINUSERNAME} :admin " ${REPONAME} " # # Thanks Arek!
444+ chmod -R a+rX,g+w " ${REPONAME} "
445+ chown -R ${ADMINUSERNAME} :admin " ${REPONAME} "
445446
446447rm " $REPOLOC /autopkg-latest1.pkg"
447448rm " $REPOLOC /munkitools2.pkg"
448- rm " $REPOLOC /munkiadmin.dmg"
449- rm " $REPOLOC /AutoPkgr.dmg"
450449rm " $REPOLOC /munkireport-" * .pkg
451450
452451${LOGGER} " I put my toys away."
453452
454453echo " Thank you for flying Munki in a Box Air. You now have a working repo, go forth and install your clients."
455454
455+ echo " MunkiAdmin and AutoPkgr are ready to go, please launch them to complete their setup. MunkiAdmin needs to know where your repo is, and AutoPkgr needs to have its helper tool installed."
456+
457+ echo " Be sure to login to MunkiReport-PHP at http://localhost/munkireport-php and initiate the database, as well change the login password."
458+
456459exit 0
0 commit comments