summaryrefslogtreecommitdiff
path: root/bytemark/bin/custodian-enqueue-parse-test
blob: abd90f55e1350cacaabb5b5d2e99c6891c91d8c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
#
# Parse the two configuration files we use, and alert if there
# is a failure.
#

for file in bytemark.cfg managed-clients.cfg ; do

   if ( ! custodian-enqueue --test --file /etc/custodian/$file >/dev/null 2>/dev/null );  then
       mauvesend alert.bytemark.co.uk -i custodian-enqueue-$file -r now -s "Parse failure from custodian-enqueue against $file." --detail="<p>The file was not added to the queue successfully due to syntax error.  Please fix.</p>"
   else
       mauvesend alert.bytemark.co.uk -i custodian-enqueue-$file -c now -s "Parse failure from custodian-enqueue against $file." --detail="<p>The file was not added to the queue successfully due to syntax error.  Please fix.</p>"

   fi

done