Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# --item \
# item-name='A name' \
# item-path='A path' \
# item-stage='preflight' \
# item-type='A type' \
# item-url='A url' \
# script-do-not-wait='A boolean' \
python="/usr/bin/python"
current_user=$(${python} -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
generatejson="/Users/${current_user}/Documents/deployment/packages/installapplications/generatejson.py"
python="/usr/bin/python"
baseurl="https://server.tld/path"
ia_share="/Volumes/ia"
output="/Volumes/ia"
${python} ${generatejson} \
--item \
item-name='IA Preflight' \
item-path="${ia_share}"/scripts/root/'ia_preflight.py' \
item-stage='preflight' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'ia_preflight.py' \
script-do-not-wait=false \
\
\
\
--item \
item-name='SJU Login Window Background' \
item-path="${ia_share}"/pkgs/'sju_background_grey-1.0.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'sju_background_grey-1.0.pkg' \
script-do-not-wait=false \
\
--item \
item-name='SJU Logo' \
item-path="${ia_share}"/pkgs/'sju_logo-1.0.1.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'sju_logo-1.0.1.pkg' \
script-do-not-wait=false \
\
--item \
item-name='NoMAD Login AD' \
item-path="${ia_share}"/pkgs/'NoMADLoginAD-1.2.1-authchanger.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'NoMADLoginAD-1.2.1-authchanger.pkg' \
script-do-not-wait=false \
\
--item \
item-name='DEPNotify Command File' \
item-path="${ia_share}"/pkgs/'DEPNotify_command_file-1.0.2.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'DEPNotify_command_file-1.0.2.pkg' \
script-do-not-wait=false \
\
--item \
item-name='DEPNotify' \
item-path="${ia_share}"/pkgs/'DEPNotify-1.1.0.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'DEPNotify-1.1.0.pkg' \
script-do-not-wait=false \
\
--item \
item-name='MSC Background Process' \
item-path="${ia_share}"/pkgs/'munkitools_launchd-3.0.3265.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'munkitools_launchd-3.0.3265.pkg' \
script-do-not-wait=false \
\
--item \
item-name='MSC Core' \
item-path="${ia_share}"/pkgs/'munkitools_core-3.4.1.3557.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'munkitools_core-3.4.1.3557.pkg' \
script-do-not-wait=false \
\
--item \
item-name='SJU Background' \
item-path="${ia_share}"/pkgs/'sju_background-1.1.2.pkg' \
item-stage='setupassistant' \
item-type='package' \
item-url="${baseurl}"/pkgs/'sju_background-1.1.2.pkg' \
script-do-not-wait=false \
\
\
\
--item \
item-name='Caffeinate Machine' \
item-path="${ia_share}"/scripts/root/'caffeinate.py' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'caffeinate.py' \
script-do-not-wait=true \
\
--item \
item-name='Bless VM' \
item-path="${ia_share}"/scripts/root/'high_sierra_vm_bless.py' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'high_sierra_vm_bless.py' \
script-do-not-wait=false \
\
--item \
item-name='Munki Bootstrap' \
item-path="${ia_share}"/scripts/root/'munki_bootstrap.py' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'munki_bootstrap.py' \
script-do-not-wait=false \
\
--item \
item-name='MSC Background Process Loader' \
item-path="${ia_share}"/scripts/root/'munki_launchd_loader.py' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'munki_launchd_loader.py' \
script-do-not-wait=false \
\
--item \
item-name='Dock Configuration' \
item-path="${ia_share}"/scripts/user/'dockutil.py' \
item-stage='userland' \
item-type='userscript' \
item-url="${baseurl}"/scripts/user/'dockutil.py' \
script-do-not-wait=false \
\
--item \
item-name='Set Background' \
item-path="${ia_share}"/scripts/user/'set_background_v2.sh' \
item-stage='userland' \
item-type='userscript' \
item-url="${baseurl}"/scripts/user/'set_background_v2.sh' \
script-do-not-wait=false \
\
--item \
item-name='Disable Sleep' \
item-path="${ia_share}"/scripts/root/'disable_sleep.sh' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'disable_sleep.sh' \
script-do-not-wait=false \
\
--item \
item-name='Delete iLife and iWork' \
item-path="${ia_share}"/scripts/root/'delete_ilife_iwork.sh' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'delete_ilife_iwork.sh' \
script-do-not-wait=false \
\
--item \
item-name='Finish Registration' \
item-path="${ia_share}"/scripts/root/'finish_registration.sh' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'finish_registration.sh' \
script-do-not-wait=false \
\
--item \
item-name='MSC Background Trigger' \
item-path="${ia_share}"/scripts/root/'munki_auto_trigger.py' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'munki_auto_trigger.py' \
script-do-not-wait=true \
\
--item \
item-name='Notify User' \
item-path="${ia_share}"/scripts/user/'notify_user.sh' \
item-stage='userland' \
item-type='userscript' \
item-url="${baseurl}"/scripts/user/'notify_user.sh' \
script-do-not-wait=false \
\
--item \
item-name='Finish DEPNotify' \
item-path="${ia_share}"/scripts/root/'finish_depnotify.sh' \
item-stage='userland' \
item-type='rootscript' \
item-url="${baseurl}"/scripts/root/'finish_depnotify.sh' \
script-do-not-wait=false \
\
--base-url "${baseurl}" \
--output "${output}"
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment