An automated installer for AutoPkg and JSSImporter.
- Installs command line tools if not present (because
git
is required for AutoPkg) - Downloads, installs and configures the latest version of AutoPkg
- Uses AutoPkg to install JSSImporter
- Configures JSSImporter
The script is idempotent. It is safe to run if the Xcode Command Line Tools, AutoPkg and/or JSSImporter are already installed. They will only be updated if they are out of date. Any existing AutoPkg repos will also be updated.
Create a user on each JSS Instance with the following credentials (System Settings => JSS User Accounts & Groups):
- Account:
- Username:
AutoPkg
- Access Level:
Full Access
- Privilege Set:
Custom
- Access Status:
Enabled
- Full Name:
AutoPkg JSSImporter
- Email Address:
jamfadmin@myorg.com
- Password:
ChangeMe!!!
- Username:
- Privileges:
- Categories:
Create
Read
Update
- Computer Extension Attributes:
Create
Read
Update
- File Share Distribution Points:
Read
- Packages:
Create
Read
Update
- Policies:
Create
Read
Update
- Scripts:
Create
Read
Update
- Smart Computer Groups:
Create
Read
Update
- Static Computer Groups:
Create
Read
Update
- Categories:
You also need to know the password that the JSS uses to connect to the distribution point.
Either edit the variables in autopkg_setup_for_jss.sh
directly, or make a
config file with the same content.
# JSS address, API user and password
JSS_URL="https://changeme.jamfcloud.com"
JSS_API_AUTOPKG_USER="AutoPkg"
JSS_API_AUTOPKG_PW="ChangeMe!!!"
JSS_TYPE="Cloud"
# JSS address, API user and password
JSS_URL="https://changeme.com:8443/"
JSS_API_AUTOPKG_USER="AutoPkg"
JSS_API_AUTOPKG_PW="ChangeMe!!!"
JSS_TYPE="DP"
# Jamf Distribution Server name and password. In normal usage, this is sufficient
# due to information gathered from the JSS.
JAMFREPO_NAME="CasperShare"
JAMFREPO_PW="ChangeMeToo!!!"
# JSS address, API user and password
JSS_URL="https://changeme.com:8443/"
JSS_API_AUTOPKG_USER="AutoPkg"
JSS_API_AUTOPKG_PW="ChangeMe!!!"
JSS_TYPE="Local"
# Jamf repo share name and mount point.
JAMFREPO_NAME="CasperShare"
JAMFREPO_MOUNTPOINT="/Volumes/CasperMountPoint"
Note that any paths in a config file should be absolute.
Run the script as the regular user (not as root/sudo):
If you edited autopkg_setup_for_jss.sh
directly:
./autopkg_setup_for_jss.sh
If supplying a config file:
./autopkg_setup_for_jss.sh --prefs=/path/to/config_file.sh
Note that any paths should be absolute.
Run the script with -p
or --prefs_only
to simply switch preferences without installing or updating anything.
./autopkg_setup_for_jss.sh --prefs=/path/to/config_file.sh --prefs_only
Run the script with -s
or --sharepoint
to install the python requirements for communicating with the SharePoint API:
./autopkg_setup_for_jss.sh --sharepoint
Run the script with -f
or --force
to force-update AutoPkg (requires password entry):
./autopkg_setup_for_jss.sh --force