[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r545: add variables and a report layout which permits

R P Herrold herrold at owlriver.com
Fri Feb 28 17:16:21 UTC 2014


------------------------------------------------------------
revno: 545
committer: R P Herrold <herrold at owlriver.com>
branch nick: lsb-puppet
timestamp: Fri 2014-02-28 12:16:21 -0500
message:
  add variables and a report layout which permits 
  sorting out de-sequenced ones
modified:
  modules/puppet/files/puppet-agent-health-report
-------------- next part --------------
=== modified file 'modules/puppet/files/puppet-agent-health-report'
--- a/modules/puppet/files/puppet-agent-health-report	2014-02-28 17:05:54 +0000
+++ b/modules/puppet/files/puppet-agent-health-report	2014-02-28 17:16:21 +0000
@@ -1,19 +1,35 @@
 #!/bin/sh
-
+#
+#	puppet-agent-health-report
+#
+#	suitable for cron	
+#
+PATH='/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:~/bin/:/home/herrold/bin:~/bin/'
+#
 TEMP_PATH=$(mktemp -d --tmpdir puppet-health.XXXXXXXXXX)
-
-cd /var/lib/puppet/yaml/node
-
-find . -mmin +125 -print \
+RECIPIENTS="licquia at linuxfoundation.org,herrold at owlriver.com"
+BAS=`basename $0`
+STALE_TIME="125"
+
+RPT_ROOT="/var/lib/puppet/yaml/node"
+cd ${RPT_ROOT}
+
+find . -mmin +${STALE_TIME} -type f -print \
   | sort \
   | (while read f; do ls -l $f; done) \
   | cut -d' ' -f6- \
   > $TEMP_PATH/report
 
 if [ -s $TEMP_PATH/report ]; then
+  ( echo "report: $BAS" ; \
+    echo -n "date: " ; date ; \
+    cat $TEMP_PATH/report ; \
+    echo -n "lines: " ; \
+    wc -l $TEMP_PATH/report ; \
+    echo "# EOJ" ) | \
   mail -s "LSB Puppet agent health report" \
-    licquia at linuxfoundation.org herrold at owlriver.com \
-    < $TEMP_PATH/report
+    ${RECIPIENTS}
 fi
 
 rm -rf $TEMP_PATH
+#



More information about the lsb-messages mailing list