We have just started using LightSpeed Filtering and I am looking for a way (extension Attribute) to determine it is installed on a computer. It adds two small clients on the computer but they are hard to find. It also adds two plist files to Library/Preferences. Does anyone have an extension attribute that I can use to find if these specific plist files are installed?
Answer
Extension Attribute to find a plist / lightspeed filter installed
Best answer by rockpapergoat
ls's -l option gives you the long output, not grep.
you could do a simple test in bash, sort of like this:
#!/usr/bin/env bash
file="/etc/ntp.conf"
if [[ -e $file ]]; then
echo "yes"
elif [[ ! -e $file ]]; then
echo "no"
fi
in ruby (and other languages) you can make it even simpler. here's an example:
#!/usr/bin/env ruby
result = File.exist?("/etc/ntp.conf") ? "yes" : "no"
puts "<result>#{result}</result>"
likewise, if you're dealing with plugins, you probably want to track versions. here's an example in ruby: https://github.com/rockpapergoat/scripts/blob/master/misc/get_app_version.rb
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
