Skip to main content
Question

Help with Extension Attribute


Forum|alt.badge.img+4

Hello All, I am hoping you can help me with an extension attribute that isn't quite working,

This summer, we are switching from Lightspeed to Securly. I want to create an extension attribute that looks for the Lightspeed Mobile Filter plist.

I am using this code for the attribute:

!/usr/bin/env bash

file="/Library/LaunchDaemons/com.lightspeedsystems.mobilefilter.plist"

if [[ -e $file ]]; then echo "yes"
elif [[ ! -e $file ]]; then echo "no"
fi

When I run it through ARD, I get a "yes" from computer that has the Lightspeed Mobile Filter installed. I created the extension attribute in our JSS, but none of the computers are reporting back.

I used Data Type: String, Inv Display: General, Input Type: Script

4 replies

Forum|alt.badge.img+8
  • Contributor
  • 147 replies
  • June 12, 2017

@jgrubbs You need to wrap your echoes with <result></result> tags for EA responses.


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 21 replies
  • June 12, 2017

@StoneMagnet like this:

if [[ -e $file ]]; then <result>echo "yes"</result>
elif [[ ! -e $file ]]; then <result>echo "no"</result>
fi


Forum|alt.badge.img+8
  • Contributor
  • 147 replies
  • June 12, 2017

@jgrubbs Almost, you need put those tags inside your echo like echo "<result>Some response here</result>". What you return inside those tags is what the JSS displays for the EA response.


donmontalvo
Forum|alt.badge.img+36
  • Legendary Contributor
  • 4293 replies
  • June 12, 2017

Not sure elif or double brackets is needed, how about?

#!/bin/bash

file="/Library/LaunchDaemons/com.lightspeedsystems.mobilefilter.plist"

if [ -e $file ]; then
    echo "<result>yes</result>"
else
    echo "<result>no</result>"
fi

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings