Skip to content

Instantly share code, notes, and snippets.

@groob
Created May 15, 2013 15:18
Show Gist options
  • Save groob/5584763 to your computer and use it in GitHub Desktop.
Save groob/5584763 to your computer and use it in GitHub Desktop.
#!/bin/bash
source /usr/local/munki/munkiwebadmin-config
FILES=(
"preflight"
"postflight"
"report_broken_client"
"munkiwebadmin-config"
)
for item in ${FILES[@]}
do
chmod 755 "${item}"
chown root:wheel "${item}"
done
chmod 755 "${MWA_SSL_CERTIFICATE}"
chown root:wheel "${MWA_SSL_CERTIFICATE}"
source /usr/local/munki/munkiwebadmin-config
defaults write /Library/Preferences/ManagedInstalls SoftwareRepoURL "${MWA_HOST}"
defaults write /Library/Preferences/ManagedInstalls SoftwareRepoCACertificate "${MWA_SSL_CERTIFICATE}"
defaults write /Library/Preferences/ManagedInstalls ClientIdentifier "common"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment