Feature request: scope a group or policy (etc) to a file

donmontalvo
Esteemed Contributor III

I'm fairly certain this doesn't exist yet, but now that we're moving forward on some policies, it's becoming more and more important.

Feature request:

A way to scope a group or policy to a file...like a text or Excel file.

Thanks,
Don

--
https://donmontalvo.com
9 REPLIES 9

tlarkin
Honored Contributor

Dang Miles beat me to it when I was driving from one building to another. This can be easily done by checking if a file exists, and then have it trigging a custom trigger policy. Do note that the if [[ -e /path/to/file ]] can only check for one file at a time, so if you have multiple strings you need to loop it.

I still have not had the time to read up on these extension attributes but they sounds pretty neat

milesleacy
Valued Contributor

They’re like supported dummy receipts. :)

Is it any wonder that I love them?

--
Miles Leacy
Technical Training Manager
Mobile (347) 277-7321

miles at jamfsoftware.com
....................................................................
JAMF Software
1011 Washington Ave. S
Suite 350
Minneapolis, MN 55415
....................................................................
Office: (612) 605-6625
Facsimile: (612) 332-9054
....................................................................
US Support: (612) 216-1296
UK Support +44.(0)20.3002.3907
AU Support +61.(0)2.8014.7469
....................................................................
http://www.jamfsoftware.com

ernstcs
Contributor III

Can you give a little more context to this, example of why?

I get what it is, but usually understanding why may help with other things.
=)

Craig E

donmontalvo
Esteemed Contributor III

It's a feature request. ;)

--
https://donmontalvo.com

ernstcs
Contributor III

Make sure you email support, too, then...

milesleacy
Valued Contributor

You can use an extension attribute. :)

Here's the script to populate it.

if [ -e /Path/To/File ]
then echo "<result>Yes</result>"
else echo "<result>No</result>"
fi

I hope this helps.

Thanks,

-- Miles Leacy
Technical Training Manager
Mobile (347) 277-7321

miles at jamfsoftware.com
....................................................................
JAMF Software
1011 Washington Ave. S
Suite 350
Minneapolis, MN 55415
....................................................................
Office: (612) 605-6625
Facsimile: (612) 332-9054
....................................................................
US Support: (612) 216-1296
UK Support +44.(0)20.3002.3907
AU Support +61.(0)2.8014.7469
....................................................................
http://www.jamfsoftware.com

donmontalvo
Esteemed Contributor III

Yes, you're right, just sent it off to our buddy. :)

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

<bowing-to-the-man>

Miles, you rock! This is exactly...EXACTLY...what we were looking for! We're gearing up to upgrade to 7.21, I'll definitely put this on our todo list...

Don

--
https://donmontalvo.com

rmanly
Contributor III

Somewhat more cryptic; I think I got the inspiration/stole it from another
posting but this also works, and on just one line ;)

I am touching /var/log/refreshed at the end of a policy we are using for
some end of year cleanup.

#!/bin/bash [ -f /var/log/refreshed ] && echo "<result>Refreshed</result>"
|| echo "<result>NOT YET</result>"

Ryan M. Manly
Glenbrook High Schools
ACMT, ACSP, Net+, CCA