-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