From 0601ba879fa9c2efc3081b24dea5f6d1c22402db Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Wed, 24 Nov 2010 09:30:05 +0000 Subject: testing/coova-chilli: upgrade to 1.2.5. Init script added --- testing/coova-chilli/APKBUILD | 12 +++++------ testing/coova-chilli/chilli.initd | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 7 deletions(-) create mode 100755 testing/coova-chilli/chilli.initd diff --git a/testing/coova-chilli/APKBUILD b/testing/coova-chilli/APKBUILD index 2ab98d0ba..b61df8d18 100644 --- a/testing/coova-chilli/APKBUILD +++ b/testing/coova-chilli/APKBUILD @@ -1,11 +1,8 @@ # Contributor: grharry # Maintainer: Leonardo Arena - -# TODO: fix init.d script - pkgname=coova-chilli -pkgver=1.2.4 -pkgrel=1 +pkgver=1.2.5 +pkgrel=0 pkgdesc="CoovaChilli is an open source access controller for wireless LAN" url="http://www.coova.org/" license="GPL" @@ -32,7 +29,7 @@ build() { --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ - --localstatedir=/var/run \ + --localstatedir=/var \ --libdir=/usr/lib \ --sysconfdir=/etc \ --with-openssl @@ -42,7 +39,8 @@ build() { package() { cd $_builddir make DESTDIR="$pkgdir" install + install -D -m755 ../../chilli.initd $pkgdir/etc/init.d/chilli } -md5sums="6d942a731da07b029a1be0b58d7917d6 coova-chilli-1.2.4.tar.gz +md5sums="1b890cb043b4340e1f15c2b2cff742d3 coova-chilli-1.2.5.tar.gz 4135e6e19bafdad777b8ca7388ff4101 coova-chilli-ssl.patch" diff --git a/testing/coova-chilli/chilli.initd b/testing/coova-chilli/chilli.initd new file mode 100755 index 000000000..96c9410fa --- /dev/null +++ b/testing/coova-chilli/chilli.initd @@ -0,0 +1,42 @@ +#!/sbin/runscript + +depend() { + use net + after firewall + provide chilli +} + + +checkconfig() { + if [ -f /etc/chilli.conf ]; then + return 0; + else + eerror "Error starting CoovaChilli. Please create /etc/chilli.conf before." + return 1; + fi + +} + +start() { + checkconfig || return 1 + ebegin "Starting CoovaChilli Captive Portal" + + echo 1 > /proc/sys/net/ipv4/ip_forward + lsmod | grep tun >& /dev/null + + if [ $? -ne 0 ]; then + modprobe tun >& /dev/null + fi + + start-stop-daemon --start --pidfile /var/run/chilli.pid --quiet \ + --exec /usr/sbin/chilli -- --pidfile=/var/run/chilli.pid + eend $? +} + +stop() { + ebegin "Stopping CoovaChilli Captive Portal" + start-stop-daemon --stop --pidfile /var/run/chilli.pid --quiet + eend $? +} + + -- cgit v1.2.3