[Pkg-ossec-devel] [SCM] Git repository for pkg-ossec branch, master, updated. f89fb2c00b1a2606035e5cd0e35b4ebe99f049ac

Javier Fernandez-Sanguino jfs at debian.org
Wed Aug 29 16:31:34 UTC 2012


The following commit has been merged in the master branch:
commit 29ab347e8105fa67e9968a8a2ebdbc335d5a09b7
Author: Javier Fernandez-Sanguino <jfs at debian.org>
Date:   Wed Aug 29 01:45:09 2012 +0200

    Add the date to the logfile and append instead of overwriting

diff --git a/debian/ossec-hids-agent.init b/debian/ossec-hids-agent.init
index 9369946..b0e3806 100755
--- a/debian/ossec-hids-agent.init
+++ b/debian/ossec-hids-agent.init
@@ -77,7 +77,10 @@ do_test_rules()
 #
 do_start()
 {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 start" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control start $OUT"`
 	return $?
 	# TODO REVIEW - Return
@@ -87,7 +90,10 @@ do_start()
 }
 
 do_stop() {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 stop" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control stop $OUT"`
 	return $?
 	# TODO REVIEW - Return
@@ -98,7 +104,10 @@ do_stop() {
 }
 
 do_status() {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 status" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control status $OUT"`
 	return $?
 }
diff --git a/debian/ossec-hids-local.init b/debian/ossec-hids-local.init
index 30bff28..6f26463 100755
--- a/debian/ossec-hids-local.init
+++ b/debian/ossec-hids-local.init
@@ -77,7 +77,10 @@ do_test_rules()
 #
 do_start()
 {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 start" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control start $OUT"`
 	return $?
 	# TODO REVIEW - Return
@@ -87,7 +90,10 @@ do_start()
 }
 
 do_stop() {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">$LOGFILE 2>&1"
+		echo "`date -R` -- $0 stop" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control stop $OUT"`
 	return $?
 	# TODO REVIEW - Return
@@ -98,7 +104,10 @@ do_stop() {
 }
 
 do_status() {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">$LOGFILE 2>&1"
+		echo "`date -R` -- $0 status" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control status $OUT"`
 	return $?
 }
diff --git a/debian/ossec-hids-server.init b/debian/ossec-hids-server.init
index 574b218..1df6b37 100755
--- a/debian/ossec-hids-server.init
+++ b/debian/ossec-hids-server.init
@@ -77,7 +77,10 @@ do_test_rules()
 #
 do_start()
 {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 start" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control start $OUT"`
 	return $?
 	# TODO REVIEW - Return
@@ -87,7 +90,10 @@ do_start()
 }
 
 do_stop() {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 stop" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control stop $OUT"`
 	return $?
 	# TODO REVIEW - Return
@@ -98,7 +104,10 @@ do_stop() {
 }
 
 do_status() {
-	[ -z "$DEBIAN_SCRIPT_DEBUG" ] && OUT=">$LOGFILE 2>&1"
+	if [ -z "$DEBIAN_SCRIPT_DEBUG" ] ; then
+		OUT=">>$LOGFILE 2>&1"
+		echo "`date -R` -- $0 status" >>$LOGFILE
+	fi
 	`eval "${DIRECTORY}/bin/ossec-control status $OUT"`
 	return $?
 }

-- 
Git repository for pkg-ossec



More information about the Pkg-ossec-devel mailing list