Skip to content

Commit

Permalink
Jamf 10 friendly templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham committed Oct 14, 2019
1 parent b9c9aa8 commit 54d9643
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
<type>script</type>
<platform>Mac</platform>
<script>#!/bin/bash

CFBundleVersion=$(defaults read /Applications/"%NAME%.app"/Contents/Info.plist CFBundleVersion)

echo "&lt;result&gt;$CFBundleVersion&lt;/result&gt;"
exit 0</script>
</input_type>
<inventory_display>Extension Attributes</inventory_display>
<recon_display>Extension Attributes</recon_display>
</computer_extension_attribute>
</computer_extension_attribute>
8 changes: 5 additions & 3 deletions example_templates/ExtensionAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
<input_type>
<type>script</type>
<platform>Mac</platform>
<script>#!/usr/bin/python
<script>#!/bin/bash

# Do some stuff
result="True"

# Don't forget to encode reserved characters
print '&lt;result&gt;%s&lt;/result&gt;' % 'True'</script>
echo "&lt;result&gt;$result&lt;/result&gt;"
exit 0</script>
</input_type>
<inventory_display>Extension Attributes</inventory_display>
<recon_display>Extension Attributes</recon_display>
</computer_extension_attribute>
</computer_extension_attribute>
6 changes: 4 additions & 2 deletions example_templates/PolicyTemplate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<general>
<!-- Enable ID or Name for a Site-based Policy
<site>
<id>%SITE_ID%</id>
<name>%SITE_NAME%</name>
<id>%site_id%</id>
<name>%site_name%</name>
</site> -->
<name>Install Latest %PROD_NAME%</name>
<enabled>true</enabled>
Expand All @@ -25,6 +25,8 @@
<!--Icons added by JSSImporter-->
<use_for_self_service>true</use_for_self_service>
<install_button_text>Install %VERSION%</install_button_text>
<reinstall_button_text>Install %VERSION%</reinstall_button_text>
<self_service_display_name>Install Latest %PROD_NAME%</self_service_display_name>
<self_service_description>%SELF_SERVICE_DESCRIPTION%</self_service_description>
</self_service>
<maintenance>
Expand Down

0 comments on commit 54d9643

Please sign in to comment.