Skip to content

Does Not Work with Version 9 #1

Description

@ponyboy119

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions