summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Smee <strerror@gentoo.org>2005-10-08 13:52:29 +0000
committerBenjamin Smee <strerror@gentoo.org>2005-10-08 13:52:29 +0000
commit27ee41ac13cec6b6ebc2789ca12ed678e38ebac0 (patch)
tree7cff8edf822d16331927d0229f4b6a6b8b5789de /net-analyzer/sancp/files
parentNew version for sguil integration. Includes init.d and conf.d files (diff)
downloadgentoo-2-27ee41ac13cec6b6ebc2789ca12ed678e38ebac0.tar.gz
gentoo-2-27ee41ac13cec6b6ebc2789ca12ed678e38ebac0.tar.bz2
gentoo-2-27ee41ac13cec6b6ebc2789ca12ed678e38ebac0.zip
Initial import. Thanks to soulse for base ebuild
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'net-analyzer/sancp/files')
-rw-r--r--net-analyzer/sancp/files/digest-sancp-1.6.11
-rw-r--r--net-analyzer/sancp/files/sancp.confd13
-rw-r--r--net-analyzer/sancp/files/sancp.rc143
3 files changed, 57 insertions, 0 deletions
diff --git a/net-analyzer/sancp/files/digest-sancp-1.6.1 b/net-analyzer/sancp/files/digest-sancp-1.6.1
new file mode 100644
index 000000000000..a55fe08d5eab
--- /dev/null
+++ b/net-analyzer/sancp/files/digest-sancp-1.6.1
@@ -0,0 +1 @@
+MD5 b83e2f4abb2bf7b10fd874aa58f6324c sancp-1.6.1.tar.gz 69986
diff --git a/net-analyzer/sancp/files/sancp.confd b/net-analyzer/sancp/files/sancp.confd
new file mode 100644
index 000000000000..49208434909b
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp.confd
@@ -0,0 +1,13 @@
+# Config file for /etc/init.d/sancp
+
+# Interface to listen on
+IFACE="eth0"
+
+# Directory to log in
+LOGDIR="/var/log/sancp"
+
+# Default config file
+CONF="/etc/sancp/sancp.conf"
+
+# You could add more options :)
+SANCP_OPTS="-d $LOGDIR/today -i $IFACE -c $CONF -u sancp -g sancp"
diff --git a/net-analyzer/sancp/files/sancp.rc1 b/net-analyzer/sancp/files/sancp.rc1
new file mode 100644
index 000000000000..d5f8ea17c89f
--- /dev/null
+++ b/net-analyzer/sancp/files/sancp.rc1
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/sancp/files/sancp.rc1,v 1.1 2005/10/08 13:52:29 strerror Exp $
+
+today=$(date '+%Y-%m-%d')
+
+depend() {
+ need net
+}
+checkconfig() {
+ if [ ! -e /etc/sancp/sancp.conf ] ; then
+ eerror "You need an /etc/sancp/sancp.conf to run sancp"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ # Today's log directory
+ if [ ! -d $LOGDIR/$today ]; then
+ /bin/mkdir $LOGDIR/$today
+ /bin/rm -f $LOGDIR/today
+ fi
+
+ # today/ directory :)
+ if [ ! -d $LOGDIR/today ]; then
+ /bin/ln -s $LOGDIR/$today $LOGDIR/today
+ fi
+
+ ebegin "Starting sancp"
+ start-stop-daemon --start --quiet --pidfiles /var/run/sancp.pid \
+ --exec /usr/bin/sancp \
+ -- ${SANCP_OPTS} > /var/log/sancp.log 2>&1 &
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sancp"
+ start-stop-daemon --stop --quiet --pidfile /var/run/sancp.pid
+ eend $?
+}