wok-6.x rev 1463
Add: ntop, ,top-dev, ntop-man
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Oct 04 10:40:21 2008 +0200 (2008-10-04) |
parents | c26d98c9bc75 |
children | 370e6734ab9e |
files | ntop-dev/receipt ntop-man/receipt ntop/receipt ntop/stuff/etc/init.d/ntop |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ntop-dev/receipt Sat Oct 04 10:40:21 2008 +0200 1.3 @@ -0,0 +1,17 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="ntop-dev" 1.7 +VERSION="3.3.7" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Network traffic probe development files." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://www.ntop.org/" 1.12 +WANTED="ntop" 1.13 + 1.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.15 +genpkg_rules() 1.16 +{ 1.17 + mkdir -p $fs/usr/lib 1.18 + cp -a $_pkg/usr/lib/*.a $fs/usr/lib 1.19 +} 1.20 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/ntop-man/receipt Sat Oct 04 10:40:21 2008 +0200 2.3 @@ -0,0 +1,17 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="ntop-man" 2.7 +VERSION="3.3.7" 2.8 +CATEGORY="development" 2.9 +SHORT_DESC="Network traffic probe man page." 2.10 +MAINTAINER="pascal.bellard@slitaz.org" 2.11 +WEB_SITE="http://www.ntop.org/" 2.12 +WANTED="ntop" 2.13 + 2.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.15 +genpkg_rules() 2.16 +{ 2.17 + mkdir -p $_pkg/usr/share 2.18 + cp -a $_pkg/usr/share/man $fs/share 2.19 +} 2.20 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/ntop/receipt Sat Oct 04 10:40:21 2008 +0200 3.3 @@ -0,0 +1,52 @@ 3.4 +# SliTaz package receipt. 3.5 + 3.6 +PACKAGE="ntop" 3.7 +VERSION="3.3.7" 3.8 +CATEGORY="network" 3.9 +SHORT_DESC="Network traffic probe." 3.10 +MAINTAINER="pascal.bellard@slitaz.org" 3.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 3.12 +WEB_SITE="http://www.ntop.org/" 3.13 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 3.14 +DEPENDS="zlib openssl libpng libpcap glibc gdbm rrdtool perl" 3.15 +BUILD_DEPENDS="zlib-dev openssl-dev libpng-dev libpcap libtool glibc-dev gdbm-dev rrdtool autoconf automake rrdtool-dev" 3.16 +CONFIG_FILES="/etc/ntop" 3.17 + 3.18 +# Rules to configure and make the package. 3.19 +compile_rules() 3.20 +{ 3.21 + cd $src 3.22 + ./autogen.sh --prefix=/usr --infodir=/usr/share/info \ 3.23 + --sysconfdir=/etc --localstatedir=/var \ 3.24 + --mandir=/usr/share/man $CONFIGURE_ARGS && 3.25 + make && 3.26 + make DESTDIR=$PWD/_pkg install install-data-as 3.27 +} 3.28 + 3.29 +# Rules to gen a SliTaz package suitable for Tazpkg. 3.30 +genpkg_rules() 3.31 +{ 3.32 + mkdir -p $fs/usr/lib/plugins $fs/usr/share 3.33 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 3.34 + cp -a $_pkg/usr/lib/ntop $fs/usr/lib 3.35 + cp -a $_pkg/usr/bin $fs/usr 3.36 + cp -a $_pkg/usr/share/ntop $fs/usr/share 3.37 + chown -R 80.80 $fs/usr/share/ntop 3.38 + cp -a $_pkg/usr/bin $fs 3.39 + cp -a $_pkg/etc $fs 3.40 + cp -a $_pkg/var $fs 3.41 + 3.42 + # fix perms for /var/ntop 3.43 + chown nobody.nogroup $fs/var/ntop 3.44 + 3.45 + # Copy startup script and fix perms 3.46 + cp -a stuff/etc $fs 3.47 + chown root.root $fs/etc/init.d/ntop 3.48 + 3.49 + # Package all ntop pkgs 3.50 + for i in $(cd $WOK; ls -d ntop-*) 3.51 + do 3.52 + tazwok genpkg $i 3.53 + done 3.54 +} 3.55 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/ntop/stuff/etc/init.d/ntop Sat Oct 04 10:40:21 2008 +0200 4.3 @@ -0,0 +1,62 @@ 4.4 +#!/bin/sh 4.5 +# /etc/init.d/ntop : Start, stop and restart ntop daemon on SliTaz, at 4.6 +# boot time or with the command line. 4.7 +# 4.8 +# To start SSH server at boot time, just put ntop in the $RUN_DAEMONS 4.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf 4.10 +# 4.11 +. /etc/init.d/rc.functions 4.12 + 4.13 + 4.14 +NAME=ntop 4.15 +DESC="ntop server" 4.16 +DAEMON=/usr/bin/ntop 4.17 + 4.18 +HTTP_PORT="3000" 4.19 + 4.20 +OPTIONS="-w HTTP_PORT -d" 4.21 +PIDFILE=/var/run/ntop.pid 4.22 + 4.23 +case "$1" in 4.24 + start) 4.25 + if [ -f $PIDFILE ] ; then 4.26 + echo "$NAME already running." 4.27 + exit 1 4.28 + fi 4.29 + # We need to set ntop admin password. 4.30 + if [ ! -f /var/ntop/ntop_pw.db ] ; then 4.31 + ntop -A || exit 4.32 + fi 4.33 + echo -n "Starting $DESC: $NAME... " 4.34 + $DAEMON $OPTIONS 4.35 + status 4.36 + ;; 4.37 + stop) 4.38 + if [ ! -f $PIDFILE ] ; then 4.39 + echo "$NAME is not running." 4.40 + exit 1 4.41 + fi 4.42 + echo -n "Stopping $DESC: $NAME... " 4.43 + kill `cat $PIDFILE` && rm -f $PIDFILE 4.44 + status 4.45 + ;; 4.46 + restart) 4.47 + if [ ! -f $PIDFILE ] ; then 4.48 + echo "$NAME is not running." 4.49 + exit 1 4.50 + fi 4.51 + echo -n "Restarting $DESC: $NAME... " 4.52 + kill `cat $PIDFILE` && rm -f $PIDFILE 4.53 + sleep 2 4.54 + $DAEMON $OPTIONS 4.55 + status 4.56 + ;; 4.57 + *) 4.58 + echo "" 4.59 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 4.60 + echo "" 4.61 + exit 1 4.62 + ;; 4.63 +esac 4.64 + 4.65 +exit 0