diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-12-11 16:36:56 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-12-11 16:36:56 +0000 |
commit | 2d8a0e86331fcd5101ddb8d89a0f7f18d6866450 (patch) | |
tree | d3d9fe10e0bcab6d13216eb23d9e4830accd23ed /zshfunc | |
parent | 0d4eb7a56bf0ac40619d942562f6d296888edb12 (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
Diffstat (limited to 'zshfunc')
-rw-r--r-- | zshfunc/reinit-debian-samhain-one | 6 |
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; |