X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=aea8ce2d392f345beba97a638848eef7b5d94859;hb=734c40acb70cd23190ea3d171c49ec318dbdc2d1;hp=f059b135152fb21afebe3e4a618c2b5c940ac344;hpb=bcfe2cc064005ef5004a78b004e7a21d24ce0b1c;p=ossec-hids-cn.git diff --git a/debian/postinst b/debian/postinst index f059b13..aea8ce2 100755 --- a/debian/postinst +++ b/debian/postinst @@ -31,7 +31,9 @@ esac . /usr/share/carnet-tools/functions.sh # get installation directory -. /etc/ossec-init.conf +if [ -e /etc/ossec-init.conf ]; then + . /etc/ossec-init.conf +fi if [ "X${DIRECTORY}" = "X" ]; then DIRECTORY="/var/ossec" fi @@ -73,7 +75,7 @@ fi cp-update --comment '' \ ossec-hids-cn "$local_rules.$$" < + 1002 rsync @@ -83,29 +85,43 @@ cp-update --comment '' \ 1002 ^sophie|^smartd - Events ignored + Ignore Sophie/SMARTd - - 3303 Events ignored - 3356 - Ignore blacklisted mail + 3356 + Ignore blacklisted mail + + + 1002 + cache + ^named + Ignore BIND cache warnings + + + + 2933 + Updated timestamp for job + ^anacron + Ignore Anacron warnings + EOF cp_mv "$local_rules.$$" "$local_rules" # and restart the service -if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d ossec-hids restart -else - /etc/init.d/ossec-hids restart +if [ -x /etc/init.d/ossec-hids ]; then + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d ossec-hids restart || true + else + /etc/init.d/ossec-hids restart || true + fi fi # dh_installdeb will replace this with shell code automatically