-
Notifications
You must be signed in to change notification settings - Fork 56
Creating and Configuring Scripts
Place a script in the scripts directory and run ./sync.py --url https://your.jss.com:8443 --username git2jss_admin --password your_password_here. This will upload each script in the scripts directory to the JSS with the default name being the file name.
The only information that is updated when doing this is the script content, if the script already exists in the JSS and has other information populated such as parameters, info, etc... This information will be retained in the JSS unless a template has been created.
The following file extensions will be treated as scripts, any other file types in the script directory will be ignored.
.sh, .py, .pl, .swift
Templates are a special way of populating additional data in the JSS, this allows us to specify things like parameters or information in our git repo and have it uploaded to JSS.
An example can be found in scripts/templates/sample_script.xml, each template must have the same basename of the script - for example we cannot have sample_script.py and sample_script.sh as scripts because sync.py will not be able to determine which one it should use. (this may be resolved in a future update by specifying the full script name and appending .xml ex - sample_script.py.xml)
<script>
<name>Apply Software Updates</name>
<category>Scripts</category>
<filename></filename>
<info/>
<notes>Created By: Adam Furbee</notes>
<priority>After</priority>
<parameters/>
<os_requirements/>
</script>