aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-11-24 09:30:05 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-11-24 09:30:05 +0000
commit0601ba879fa9c2efc3081b24dea5f6d1c22402db (patch)
treeb34448becd0860d4e2b09a30a660497434d364c5 /testing
parentaa9201e29d57bc67d0b989b9cd2dc0e21dcdbdb9 (diff)
downloadaports-0601ba879fa9c2efc3081b24dea5f6d1c22402db.tar.bz2
aports-0601ba879fa9c2efc3081b24dea5f6d1c22402db.tar.xz
testing/coova-chilli: upgrade to 1.2.5. Init script added
Diffstat (limited to 'testing')
-rw-r--r--testing/coova-chilli/APKBUILD12
-rwxr-xr-xtesting/coova-chilli/chilli.initd42
2 files changed, 47 insertions, 7 deletions
diff --git a/testing/coova-chilli/APKBUILD b/testing/coova-chilli/APKBUILD
index 2ab98d0bad..b61df8d181 100644
--- a/testing/coova-chilli/APKBUILD
+++ b/testing/coova-chilli/APKBUILD
@@ -1,11 +1,8 @@
# Contributor: grharry
# Maintainer: Leonardo Arena <rnalrd@gmail.com>
-
-# 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 0000000000..96c9410fa3
--- /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 $?
+}
+
+