Created
August 13, 2012 19:23
-
-
Save dhgwilliam/3343455 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
NEW='/tmp/certlist.new' | |
OLD='/tmp/certlist.old' | |
touch $NEW $OLD | |
puppet cert list --all > $NEW | |
NEWHASH=`md5sum $NEW | cut -f1 -d " " ` | |
OLDHASH=`md5sum $OLD | cut -f1 -d " " ` | |
if [ "$NEWHASH" != "$OLDHASH" ] | |
then | |
DIFF=`diff $NEW $OLD` | |
cp $NEW $OLD | |
fi | |
echo $DIFF | mailx -s "New cert request" -E [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment