Last active
August 29, 2015 14:17
-
-
Save ChicagoDev/1c7df51389add0a398cb to your computer and use it in GitHub Desktop.
Potential Cron Script To Remove Annoying Cron Job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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