You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chris Lasell edited this page Sep 24, 2019
·
1 revision
Here's how to create a new Package object in the JSS and upload the .pkg to the Master distribution point.
(this assumes you're already connected to the api with appropriate permissions)
local_pkg_path="/path/to/local.pkg"# make a new JSS::Package in ruby, to be saved into the JSSnew_pkg=JSS::Package.makename: 'package-name'new_pkg.filename='package-name.pkg'new_pkg.category='some-existing-category'# ... set more attributes of the package here...# create the JSS entry for the pkgnew_pkg.save# Upload the local file to the master dist point.# You must provide the password for the read-write connection to the # dist. point (the username comes from the API)# The dist. point will be mounted via AFP or SMB, as defined in the JSS, and# the pkg uploaded to it.new_pkg.upload_master_filelocal_pkg_path,"master_dist_rw_pw"