diff options
-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; |