[arch-commits] CVS update of extra/network/ntop (PKGBUILD ntop.confd ntop.rcd)

Aaron Griffin aaron at archlinux.org
Thu Sep 13 04:27:09 UTC 2007


    Date: Thursday, September 13, 2007 @ 00:27:09
  Author: aaron
    Path: /home/cvs-extra/extra/network/ntop

   Added: ntop.confd (1.1) ntop.rcd (1.1)
Modified: PKGBUILD (1.8 -> 1.9)

Added rc.d script from FS#7740


------------+
 PKGBUILD   |   14 ++++++++------
 ntop.confd |   16 ++++++++++++++++
 ntop.rcd   |   39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 6 deletions(-)


Index: extra/network/ntop/PKGBUILD
diff -u extra/network/ntop/PKGBUILD:1.8 extra/network/ntop/PKGBUILD:1.9
--- extra/network/ntop/PKGBUILD:1.8	Sun Jul 29 19:16:49 2007
+++ extra/network/ntop/PKGBUILD	Thu Sep 13 00:27:08 2007
@@ -1,5 +1,5 @@
-# $Id: PKGBUILD,v 1.8 2007/07/29 23:16:49 eric Exp $
-# Maintainer: Judd Vinet <jvinet at zeroflux.org>
+# $Id: PKGBUILD,v 1.9 2007/09/13 04:27:08 aaron Exp $
+# Maintainer: Aaron Griffin <aaron at archlinux.org>
 
 pkgname=ntop
 pkgver=3.3
@@ -9,16 +9,18 @@
 license=('GPL')
 url="http://www.ntop.org"
 depends=('libpcap' 'gd' 'glib' 'libxml2' 'openssl' 'gdbm' 'rrdtool' 'pcre')
-source=(http://dl.sourceforge.net/sourceforge/ntop/ntop-$pkgver.tar.gz)
-md5sums=('a0e52a85587c8a5519d822d04862dab4')
+source=(http://downloads.sourceforge.net/sourceforge/ntop/ntop-$pkgver.tar.gz
+        ntop.confd ntop.rcd)
 options=(!libtool)
 
 build() {
   cd $startdir/src/$pkgname-$pkgver
   ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
-  --disable-snmp
+      --disable-snmp
   make || return 1
   make DESTDIR=$startdir/pkg install-recursive
   install -d -m755 --owner=nobody --group=nobody $startdir/pkg/var/ntop
+
+  install -D -m755 $startdir/src/ntop.rcd $startdir/pkg/etc/rc.d/ntop 
+  install -D -m644 $startdir/src/ntop.confd $startdir/pkg/etc/conf.d/ntop 
 }
-sha1sums=('4b56f15eb502ea853308433589820161ce82c8d8')
Index: extra/network/ntop/ntop.confd
diff -u /dev/null extra/network/ntop/ntop.confd:1.1
--- /dev/null	Thu Sep 13 00:27:09 2007
+++ extra/network/ntop/ntop.confd	Thu Sep 13 00:27:09 2007
@@ -0,0 +1,16 @@
+#
+# Paramaters passed to ntop by init
+#
+# -d -- to daemonize. (without this, the init script will not work)
+#
+# Parameters to be passed to ntop
+#
+# -i -- comma separated list of interfaces to monitor
+# -w -- port to listen on (default 3000)
+#
+NTOP_ARGS="-i eth1 -w 3000"
+
+#
+# Log file for ntop
+#
+NTOP_LOG="/var/log/ntop.log"
Index: extra/network/ntop/ntop.rcd
diff -u /dev/null extra/network/ntop/ntop.rcd:1.1
--- /dev/null	Thu Sep 13 00:27:09 2007
+++ extra/network/ntop/ntop.rcd	Thu Sep 13 00:27:09 2007
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+[ -f /etc/conf.d/ntop ] && . /etc/conf.d/ntop
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+#PID=`pidof -o %PPID /usr/bin/ntop`
+case "$1" in
+  start)
+    stat_busy "Starting ntop Daemon"
+    /usr/bin/ntop -d ${NTOP_ARGS} 2>&1 >> ${NTOP_LOG}
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      add_daemon ntop
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping ntop Daemon"
+    killall /usr/bin/ntop &> /dev/null
+    #[ ! -z "$PID" ]  && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon ntop
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"  
+esac
+exit 0




More information about the arch-commits mailing list