- inicijalna Debsourceizacija..
[ossec-hids.git] / debian / prerm
diff --git a/debian/prerm b/debian/prerm
new file mode 100755 (executable)
index 0000000..ae05e73
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    purge|remove)
+      # continue below
+    ;;
+
+    *)
+        exit 0
+    ;;
+esac
+
+# stop the service
+if [ -x /usr/sbin/invoke-rc.d ]; then
+    invoke-rc.d ossec-hids stop
+else
+    /etc/init.d/ossec-hids stop
+fi
+
+# update system v init links
+update-rc.d -f ossec-hids remove
+
+exit 0