Skip to content

Instantly share code, notes, and snippets.

@kellyebler
Created December 4, 2018 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellyebler/be5b4f07edc86276569733ab43fcac8c to your computer and use it in GitHub Desktop.
Save kellyebler/be5b4f07edc86276569733ab43fcac8c to your computer and use it in GitHub Desktop.
Jamf extension attribute script for checking hosts file for crashplan
#!/bin/bash
###
### This script is intended to look for the word crashplan in a users /etc/hosts file
### and report it to the JSS if there is something blocking CrashPlan from backing up
###
crashplan_check=`/usr/bin/grep -i crashplan /etc/hosts`
if [ "$crashplan_check" = "" ];then
echo "<result>No</result>"
exit 0
else
echo "CrashPlan founded in /etc/hosts file. Reporting to JSS"
echo "<result>$crashplan_check</result>"
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment