Skip to content

Scripts that don't deserve a project of their own, but might be helpful

Notifications You must be signed in to change notification settings

BillWeiss/MiscScripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Various scripts that, while useful, don't deserve a project of their own.

blcheck.sh:
    A script, started from a forum post
    (http://www.daemonforums.org/showthread.php?t=302), to check an IP on
    a number of blacklists.  It's not the most clever bit of code, but it
    works.  I modified it to make the output more appropriate for cron: it
    doesn't have any when things are ok.  It also has an exit code that
    indicates how many blacklists you got a hit on.

    I'm running it from cron as:
    blcheck.sh $( ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | awk -F: '{print $2}' )
    which isn't the best commandline either, but it's not bad.  If I had
    puppet on here I'd probably use facter to get the IP.

named-svn-pre-commit.pl:
    A Subversion pre-commit hook for my named config.  Parts of it will be 
    pretty site-specific, but I imagine parts would be useful to someone
    else.  Assumptions:
    * Your zones are in files called db.(zone name)
    * You don't have any comments that look suspiciously like my serial
      number line
    * Your serial number line looks like:
      (whitespace)YYYYMMDDNN(whitespace); Serial
      The current code probably works if you've got any number in there,
      but I make no guarantee of future working

    I was pretty tired of people checking in zones without updating the
    serial and the associated sadness that comes from it, so I wrote a
    pre-commit hook.  Totally bad effort per pain, but what the heck.

ssl-cert-pre-commit.sh:
    A Subversion pre-commit hook to make sure that an SSL key and cert
    match up.  We have a few places in Puppet we keep SSL key/cert pairs,
    and they're automatically deployed to servers.  If they don't line up
    (for instance, someone gets a new cert but doesn't copy the new key
    in) Apache will blow up when restarted.  Don't allow that.

    Assumptions:
    * Files are named (whatever).key and (whatever).crt
    * They're in PEM format (though openssl may auto-detect the right
      format for you, I haven't tested that)

About

Scripts that don't deserve a project of their own, but might be helpful

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published