From a4027ff6279488d8b968789839be1122cba2929b Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Thu, 24 Feb 2011 18:48:05 +0100 Subject: [PATCH] * #10449: ossec-hids-cn: postrm greske --- debian/changelog | 6 ++++++ debian/postinst | 14 +++++++++----- debian/postrm | 14 +++++++++----- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index c484805..f614073 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ossec-hids-cn (2.0-3) stable; urgency=low + + * #10449: ossec-hids-cn: postrm greske + + -- Dinko Korunic Thu, 24 Feb 2011 18:45:49 +0100 + ossec-hids-cn (2.0-2) stable; urgency=low * ignoriranje BIND cache gresaka diff --git a/debian/postinst b/debian/postinst index fbd287f..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 @@ -114,10 +116,12 @@ 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 diff --git a/debian/postrm b/debian/postrm index 536075c..0d67070 100755 --- a/debian/postrm +++ b/debian/postrm @@ -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 @@ -44,10 +46,12 @@ if [ -e "$local_rules" ]; then fi # and start 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 -- 1.7.10.4