From: Dinko Korunic Date: Thu, 24 Feb 2011 17:48:05 +0000 (+0100) Subject: * #10449: ossec-hids-cn: postrm greske X-Git-Tag: v2.5.1-1~1 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=a4027ff6279488d8b968789839be1122cba2929b;p=ossec-hids-cn.git * #10449: ossec-hids-cn: postrm greske --- 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