Script Error

merryworks
New Contributor

Having an issue uninstalling Sophos via policy. I have followed the instructions here
https://www.jamf.com/jamf-nation/discussions/17881/script-to-uninstall-sophos-from-machines

My script is the following
!/bin/sh
"/Library/Application Support/Sophos/opm/Installer.app/Contents/MacOS/tools/InstallationDeployer" --remove

I have created a policy for Self Service and everytime it fails with the following

[STEP 1 of 4]
Executing Policy Uninstall Sophos
[STEP 2 of 4]
Creating directory structure for /Library/Application Support/JAMF/Downloads/
Downloading https://mail.northfieldschools.org:10000///Scripts/UninstallSophos.sh...
Error running script: The script could not be found on the server..
[STEP 3 of 4]
[STEP 4 of 4]

If I run the command in terminal

sudo "/Library/Application Support/Sophos/opm/Installer.app/Contents/MacOS/tools/InstallationDeployer" --remove

it works every time. What am I missing?

1 REPLY 1

seraphina
Contributor II

try this

#!/bin/bash
cd /Library/Application Support/Sophos/opm/Installer.app/Contents/MacOS/tools
./InstallationDeployer --remove

or perhaps

#!/bin/bash
sh /Library/Application Support/Sophos/opm/Installer.app/Contents/MacOS/tools/InstallationDeployer --remove