wok-4.x rev 1325
Add chillispot
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Aug 29 10:16:41 2008 +0000 (2008-08-29) |
parents | 0db2ef809433 |
children | 24cffdc5d961 |
files | chillispot/receipt chillispot/stuff/chilli |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/chillispot/receipt Fri Aug 29 10:16:41 2008 +0000 1.3 @@ -0,0 +1,30 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="chillispot" 1.7 +VERSION="1.1.0" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Captive portal or wireless LAN access point controller." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +WEB_SITE="http://www.chillispot.info/" 1.13 +WGET_URL="${WEB_SITE}download/$TARBALL" 1.14 +CONFIG_FILES="/etc/chilli.conf" 1.15 + 1.16 +# Rules to configure and make the package. 1.17 +compile_rules() 1.18 +{ 1.19 + cd $src 1.20 + ./configure --prefix=/usr --infodir=/usr/share/info \ 1.21 + --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && \ 1.22 + make && make DESTDIR=$PWD/_pkg install 1.23 +} 1.24 + 1.25 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.26 +genpkg_rules() 1.27 +{ 1.28 + mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/chilli/ 1.29 + cp -a $_pkg/usr/sbin $fs/usr 1.30 + cp $src/doc/chilli.conf $fs/etc 1.31 + cp stuff/chilli $fs/etc/init.d 1.32 +} 1.33 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/chillispot/stuff/chilli Fri Aug 29 10:16:41 2008 +0000 2.3 @@ -0,0 +1,55 @@ 2.4 +#!/bin/sh 2.5 +# /etc/init.d/chilli : Start, stop and restart ChilliSpot server on SliTaz, at 2.6 +# boot time or with the command line. 2.7 +# 2.8 +# To start ChilliSpot server at boot time, just put chilli in the $RUN_DAEMONS 2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf 2.10 +# 2.11 +. /etc/init.d/rc.functions 2.12 +. /etc/daemons.conf 2.13 + 2.14 +NAME=ChilliSpot 2.15 +DESC="ChilliSpot server" 2.16 +DAEMON=/usr/sbin/chilli 2.17 +OPTIONS=$CHILLI_OPTIONS 2.18 +PIDFILE=/var/run/chilli.pid 2.19 +[ -n "$OPTIONS" ] || OPTIONS="--pidfile $PIDFILE --statedir /var/lib/chilli/" 2.20 + 2.21 +case "$1" in 2.22 + start) 2.23 + if [ -f $PIDFILE ] ; then 2.24 + echo "$NAME already running." 2.25 + exit 1 2.26 + fi 2.27 + $DAEMON $OPTIONS 2.28 + status 2.29 + ;; 2.30 + stop) 2.31 + if [ ! -f $PIDFILE ] ; then 2.32 + echo "$NAME is not running." 2.33 + exit 1 2.34 + fi 2.35 + echo -n "Stopping $DESC: $NAME... " 2.36 + kill `cat $PIDFILE` 2.37 + status 2.38 + ;; 2.39 + restart) 2.40 + if [ ! -f $PIDFILE ] ; then 2.41 + echo "$NAME is not running." 2.42 + exit 1 2.43 + fi 2.44 + echo -n "Restarting $DESC: $NAME... " 2.45 + kill `cat $PIDFILE` 2.46 + sleep 2 2.47 + $DAEMON $OPTIONS 2.48 + status 2.49 + ;; 2.50 + *) 2.51 + echo "" 2.52 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.53 + echo "" 2.54 + exit 1 2.55 + ;; 2.56 +esac 2.57 + 2.58 +exit 0