Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Not Work with Version 9 #1

Open
ponyboy119 opened this issue Mar 25, 2019 · 0 comments
Open

Does Not Work with Version 9 #1

ponyboy119 opened this issue Mar 25, 2019 · 0 comments

Comments

@ponyboy119
Copy link

TL;DR the path to the binary has moved from /usr/bin to /usr/local/bin, and the results from polling the sweep binary for the definition update did not properly handle the comma and did not return the proper results. This works for version 9.7.8:

<?xml version="1.0" encoding="UTF-8"?> <extensionAttribute> <displayName>Sophos Antivirus - Latest Installed Definition Date</displayName> <description>This attribute returns the Virus Definitions Date for Sophos. This attribute template applies to Sophos version 9.x and was last tested on Sophos 9.7.8</description> <dataType>date</dataType> <scriptContentsMac>#!/bin/sh&#13; #This script has been verified to work on Sophos (v 9.7.8).&#13; &#13; #Check to see if Sophos is installed&#13; if [ -f "/usr/local/bin/sweep" ]; then&#13; result=/bin/date -j -f "%b %d %Y %T" "$(/usr/local/bin/sweep -v | grep "Data file date" |tail -1| awk '{print $6, $5, substr($7, 1, length($7)-1), $8}')" "+%Y-%m-%d %T"; &#13; echo "&lt;result&gt;$result&lt;/result&gt;";&#13; else &#13; echo "&lt;result&gt;Not installed&lt;/result&gt;";&#13; fi&#13; </scriptContentsMac> <scriptContentsWindows/> </extensionAttribute>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant