X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids-cn.git;a=blobdiff_plain;f=debian%2Fpostrm;h=0d67070fe93fa5bdd1fbc3bb5c13e40faba1e7bd;hp=536075cd044305942bc3943cb03bbf706e4f1525;hb=a4027ff6279488d8b968789839be1122cba2929b;hpb=1054ca8433b4ad5e55ba58a3e0922fbd8edfdad4 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