# HG changeset patch # User Pascal Bellard # Date 1220005001 0 # Node ID cf2ce55f4ea3ddc4385825f5577b333eff7cfce3 # Parent 0db2ef809433b2422f0693e01e2a3c6f137e1a93 Add chillispot diff -r 0db2ef809433 -r cf2ce55f4ea3 chillispot/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chillispot/receipt Fri Aug 29 10:16:41 2008 +0000 @@ -0,0 +1,30 @@ +# SliTaz package receipt. + +PACKAGE="chillispot" +VERSION="1.1.0" +CATEGORY="network" +SHORT_DESC="Captive portal or wireless LAN access point controller." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.chillispot.info/" +WGET_URL="${WEB_SITE}download/$TARBALL" +CONFIG_FILES="/etc/chilli.conf" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure --prefix=/usr --infodir=/usr/share/info \ + --sysconfdir=/etc --mandir=/usr/share/man $CONFIGURE_ARGS && \ + make && make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr $fs/etc/init.d $fs/var/lib/chilli/ + cp -a $_pkg/usr/sbin $fs/usr + cp $src/doc/chilli.conf $fs/etc + cp stuff/chilli $fs/etc/init.d +} + diff -r 0db2ef809433 -r cf2ce55f4ea3 chillispot/stuff/chilli --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/chillispot/stuff/chilli Fri Aug 29 10:16:41 2008 +0000 @@ -0,0 +1,55 @@ +#!/bin/sh +# /etc/init.d/chilli : Start, stop and restart ChilliSpot server on SliTaz, at +# boot time or with the command line. +# +# To start ChilliSpot server at boot time, just put chilli in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=ChilliSpot +DESC="ChilliSpot server" +DAEMON=/usr/sbin/chilli +OPTIONS=$CHILLI_OPTIONS +PIDFILE=/var/run/chilli.pid +[ -n "$OPTIONS" ] || OPTIONS="--pidfile $PIDFILE --statedir /var/lib/chilli/" + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0