ossec-hids: ossec-hids-aix.init (NEW) init.sh (HEAD) [dcid]

17 views
Skip to first unread message

OSSEC CVS

unread,
Aug 22, 2008, 11:33:01 AM8/22/08
to osse...@ossec.net
Module name: ossec-hids
Changes by: dcid 08/08/22 12:32:59

Modified files:
init.sh
Added files:
ossec-hids-aix.init

Log message:
Description: Adding init script for AIX. By Chris Cuevas.
Reviewed by: dcid
Bug:

--- NEW FILE: ossec-hids-aix.init ---
#!/bin/ksh
#
# name: ossec
# purpose: Init script for ossec-hids
# Aug. 07 2008 Chris Cuevas
#

case "$1" in
start )
if [ -f /var/ossec/bin/ossec-control ]; then
echo "Starting OSSEC"
/var/ossec/bin/ossec-control start
fi
;;
stop )
if [ -f /var/ossec/bin/ossec-control ]; then
echo "Stopping OSSEC"
/var/ossec/bin/ossec-control stop
fi
;;
status )
if [ -f /var/ossec/bin/ossec-control ]; then
/var/ossec/bin/ossec-control status
fi
;;
* )
echo "Usage: $0 (start | stop | status)"
exit 1
esac

Index: init.sh
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/init/init.sh,v
diff -u -r1.16 -r1.17
--- init.sh 22 Aug 2008 15:29:29 -0000 1.16
+++ init.sh 22 Aug 2008 15:32:59 -0000 1.17
@@ -85,7 +85,17 @@
ln -s /etc/init.d/ossec /etc/rc3.d/S97ossec
return 0;
fi
-
+
+ if [ "X${UN}" = "XAIX" ]; then
+ echo " - ${systemis} AIX."
+ echo " - ${modifiedinit}"
+ cp -pr ./src/init/ossec-hids-aix.init /etc/init.d/ossec
+ chmod 755 /etc/init.d/ossec
+ ln -s /etc/init.d/ossec /etc/rc2.d/S97ossec
+ ln -s /etc/init.d/ossec /etc/rc3.d/S97ossec
+ return 0;
+ fi
+
if [ "X${UN}" = "XOpenBSD" -o "X${UN}" = "XNetBSD" -o "X${UN}" = "XFreeBSD" ]; then
# Checking for the presence of ossec-control on rc.local
grep ossec-control /etc/rc.local > /dev/null 2>&1

OSSEC CVS

unread,
Jun 26, 2009, 8:47:45 AM6/26/09
to osse...@ossec.net
Module name: ossec-hids
Changes by: dcid 09/06/26 09:47:43

Modified files:
darwin-init.sh init.sh

Log message:
Description: Fixing init scripts for Darwin (patch by Peter <peter....@acquia.com>)
Reviewed by: dcid
Bug:

Index: darwin-init.sh
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/init/darwin-init.sh,v
diff -u -r1.1 -r1.2
--- darwin-init.sh 21 Aug 2006 18:34:46 -0000 1.1
+++ darwin-init.sh 26 Jun 2009 12:47:42 -0000 1.2
@@ -35,27 +35,27 @@

. /etc/rc.common
. /etc/ossec-init.conf
-if [ "X${DIRECTORY}" = "X" ]; then
+if [ "X\${DIRECTORY}" = "X" ]; then
DIRECTORY="/var/ossec"
fi


StartService ()
{
- ${DIRECTORY}/bin/ossec-control start
+ \${DIRECTORY}/bin/ossec-control start
}

StopService ()
{
- ${DIRECTORY}/bin/ossec-control stop
+ \${DIRECTORY}/bin/ossec-control stop
}

RestartService ()
{
- ${DIRECTORY}/bin/ossec-control restart
+ \${DIRECTORY}/bin/ossec-control restart
}

-RunService "$1"
+RunService "\$1"
EOF
chmod 755 /Library/StartupItems/OSSEC
chmod 644 /Library/StartupItems/OSSEC/StartupParameters.plist

Index: init.sh
===================================================================
RCS file: /usr/cvsroot/ossec-hids/src/init/init.sh,v

diff -u -r1.17 -r1.18
--- init.sh 22 Aug 2008 15:32:59 -0000 1.17
+++ init.sh 26 Jun 2009 12:47:42 -0000 1.18
@@ -67,7 +67,7 @@
fi

# Darwin init script (by Lorenzo Costanzia di Costigliole <mum...@tin.it>)
- if [ "X${NUNAME}" = "Darwin" ]; then
+ if [ "X${NUNAME}" = "XDarwin" ]; then
# Generating darwin init script.

echo " - ${systemis} Darwin."

Reply all
Reply to author
Forward
0 new messages