diff options
author | Peter Palfrader <peter@palfrader.org> | 2009-03-14 23:10:42 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2009-03-14 23:10:42 +0000 |
commit | d29bf6594b7fa49113e3f1714550d00276fb75fb (patch) | |
tree | 0dd291587db9376c0e0794a91d7fc0eea9fc5e1e /zshrc | |
parent | 0a65c98322672f2841013d08bdc01a374a3cfaa4 (diff) |
samhain stuff
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@380 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -353,6 +353,7 @@ upgrade-debian-samhain() { echo $i preexec $i; ssh $i -t ' + didsudo=0 check() { sudo /usr/sbin/samhain -t check -i -p err -s none -l none -m none }; @@ -360,6 +361,7 @@ upgrade-debian-samhain() { if [ "`check 2>&1 | grep "^CRIT" | wc -l`" != 0 ]; then echo Updating samhain db... sudo samhain --foreground -t update + didsudo=1 echo done. fi } @@ -380,6 +382,14 @@ upgrade-debian-samhain() { sudo apt-get dist-upgrade && sudo apt-get clean && [ -x /usr/sbin/samhain ] && reinit + if [ "$didsudo" = 1 ]; then + echo Updating nagios status + echo "apt" + sudo /usr/sbin/dsa-update-apt-status + echo "samhain" + grep -q OK /var/cache/dsa/nagios/samhain || sudo dsa-update-samhain-status + echo done. + fi '; done } @@ -409,6 +419,7 @@ reinit-debian-samhain-one() { echo Updating samhain db... sudo samhain --foreground -t update + grep -q OK /var/cache/dsa/nagios/samhain || sudo dsa-update-samhain-status echo done. fi; fi |