Skip to content

Instantly share code, notes, and snippets.

@ChicagoDev
Last active August 29, 2015 14:17
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 ChicagoDev/1c7df51389add0a398cb to your computer and use it in GitHub Desktop.
Save ChicagoDev/1c7df51389add0a398cb to your computer and use it in GitHub Desktop.
Potential Cron Script To Remove Annoying Cron Job
#!/bin/bash
# The skeleton of a script which checks to see if brew's openssl was uninstalled. If it was uninstalled,
# remove the cron job which sends the buggy email every hour. Additionally remove the cronjob which will be
# running this script itself.
if [ -f /usr/local/Cellar/openssl-osx-ca/1.0.3/bin/openssl-osx-ca]
then
exit 0
else
(crontab -l | grep -v openssl-osx-ca) | crontab -
#(crontab -l | grep -v remove-openssl-cronjob | crontab -
rm $remove-openssl-cronjobPATH/remove-openssl-cronjob.sh
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment