summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2013-12-11 16:36:56 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2013-12-11 16:36:56 +0000
commit2d8a0e86331fcd5101ddb8d89a0f7f18d6866450 (patch)
treed3d9fe10e0bcab6d13216eb23d9e4830accd23ed
parent0d4eb7a56bf0ac40619d942562f6d296888edb12 (diff)
update or init samhain, depending on whether we have a state file. send no mail
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@659 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rw-r--r--zshfunc/reinit-debian-samhain-one6
1 files changed, 5 insertions, 1 deletions
diff --git a/zshfunc/reinit-debian-samhain-one b/zshfunc/reinit-debian-samhain-one
index f0f28c0..774dbfd 100644
--- a/zshfunc/reinit-debian-samhain-one
+++ b/zshfunc/reinit-debian-samhain-one
@@ -25,7 +25,11 @@ ssh $host -t '
[ "$ans" = "y" ] || exit;
echo Updating samhain db...
- sudo samhain --foreground -t update
+ if [ -e /var/state/samhain/samhain_file ] ; then
+ sudo -H samhain --foreground -t update -p none -s none -l none -m none
+ else
+ sudo -H samhain --foreground -t init -p none -s none -l none -m none
+ fi
grep -q OK /var/cache/dsa/nagios/samhain || sudo dsa-update-samhain-status
echo done.
fi;