Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ossec doesnt have rc script for arch but now we do :)

  • Loading branch information...
commit 00ec9ee063c606e9e8b959b423ab888f133f6596 1 parent 8b2921e
Joshua Timberman jtimberman authored
20 ossec/metadata.json
View
@@ -6,6 +6,24 @@
"maintainer_email": "cookbooks@opscode.com",
"license": "Apache 2.0",
"platforms": {
+ "debian": [
+
+ ],
+ "ubuntu": [
+
+ ],
+ "arch": [
+
+ ],
+ "redhat": [
+
+ ],
+ "centos": [
+
+ ],
+ "fedora": [
+
+ ]
},
"dependencies": {
"build-essential": [
@@ -28,5 +46,5 @@
},
"recipes": {
},
- "version": "1.0.0"
+ "version": "1.0.1"
}
6 ossec/metadata.rb
View
@@ -3,6 +3,10 @@
license "Apache 2.0"
description "Installs/Configures ossec"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.0.0"
+version "1.0.1"
depends "build-essential"
+
+%w{ debian ubuntu arch redhat centos fedora }.each do |os|
+ supports os
+end
9 ossec/recipes/default.rb
View
@@ -63,6 +63,15 @@
notifies :restart, "service[ossec]"
end
+case node['platform']
+when "arch"
+ template "/etc/rc.d/ossec" do
+ source "ossec.rc.erb"
+ owner "root"
+ mode 0755
+ end
+end
+
service "ossec" do
supports :status => true, :restart => true
action [:enable, :start]
42 ossec/templates/arch/ossec.rc.erb
View
@@ -0,0 +1,42 @@
+#!/bin/sh
+# OSSEC Controls OSSEC HIDS
+# Author: Daniel B. Cid <dcid@ossec.net>
+# Modified for ArchLinux by Joshua Timberman <joshua@opscode.com>
+
+. /etc/ossec-init.conf
+if [ "X${DIRECTORY}" = "X" ]; then
+ DIRECTORY="<%= node['ossec']['user']['dir'] %>"
+fi
+
+
+start() {
+ ${DIRECTORY}/bin/ossec-control start
+}
+
+stop() {
+ ${DIRECTORY}/bin/ossec-control stop
+}
+
+status() {
+ ${DIRECTORY}/bin/ossec-control status
+}
+
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ status)
+ status
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+ exit 1
+esac
Please sign in to comment.
Something went wrong with that request. Please try again.