Skip to main content
Answer

Proxy Setting Smart Group?

  • December 19, 2012
  • 4 replies
  • 9 views

Forum|alt.badge.img+11

Is there a way to create a smart group based on if the user has Automatic Proxy Configuration set?

Best answer by justinworkman

I just tested this as an extension attribute:

#!/bin/sh
proxystatus=$(cat /Library/Preferences/SystemConfiguration/preferences.plist | grep -A 1 Proxy | grep -o 1)
echo "<result>$proxystatus</result>"

If you make a Smart Group based on proxystatus is 1, it should do what you're needing.

4 replies

Forum|alt.badge.img+19
  • Contributor
  • December 19, 2012

you'd first need to create an extension attribute that returns the status of that proxy setting. then, you could create your smart group based on the extension attribute.


Forum|alt.badge.img+7
  • Contributor
  • Answer
  • December 20, 2012

I just tested this as an extension attribute:

#!/bin/sh
proxystatus=$(cat /Library/Preferences/SystemConfiguration/preferences.plist | grep -A 1 Proxy | grep -o 1)
echo "<result>$proxystatus</result>"

If you make a Smart Group based on proxystatus is 1, it should do what you're needing.


Forum|alt.badge.img+11
  • Author
  • Contributor
  • December 20, 2012

Thanks!


Forum|alt.badge.img+4
  • Contributor
  • March 5, 2013

I can't get this to work on mountain lion, any recommendation?