Skip to main content

So I'm in the CCA class this week, and went back to the shop to write my first extension attribute.



For those using Sophos with multiple relay servers (we have 4).



I know the script isn't pretty. I'm not a scripting guru, but I thought I'd share for others running Sophos in larger environments.



Display Name: Sophos Relay



Description: Returns hostname of client's target Sophos relay server from /Library/Sophos Anti-Virus/RMS/MRInit.conf



Data Type: String



Input Type: Populate by script



Script:



#!/bin/bash
echo "<result>"$(cat /Library/Sophos Anti-Virus/RMS/MRInit.conf | grep -e "ParentRouterAddress" | cut -d"=" -f 2 | cut -d"," -f 3 | tail -1 | sed 's/.{2}$//')"</result>"



--



David Kucmierz
Mesquite ISD Technical Services
972.882.5506
dkucmierz at mesquiteisd.org

Be the first to reply!

Reply