Izmjene za stretch
[ossec-hids-cn.git] / debian / postinst
index fbd287f..801d23f 100755 (executable)
@@ -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,11 +116,7 @@ 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
-fi
+service ossec-hids restart || true
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.