Changeset 31951


Ignore:
Timestamp:
2012-05-28T17:45:55+02:00 (6 years ago)
Author:
jow
Message:

[packages] chillispot: use service wrappers, use network.sh to find ip address

Location:
packages/net/chillispot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/chillispot/Makefile

    r19714 r31951  
    11# 
    2 # Copyright (C) 2006-2010 OpenWrt.org 
     2# Copyright (C) 2006-2012 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=chillispot 
    1111PKG_VERSION:=1.1.0 
    12 PKG_RELEASE:=3 
     12PKG_RELEASE:=4 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/net/chillispot/files/chillispot.init

    r15247 r31951  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2012 OpenWrt.org 
     3 
    34START=50 
    45 
    5 RUN_D=/var/run 
    6 PID_F=$RUN_D/chilli.pid 
     6SERVICE_USE_PID=1 
     7SERVICE_PID_FILE=/var/run/chilli.pid 
    78 
    89start() { 
    9         include /lib/network 
    10         scan_interfaces 
    11         /sbin/insmod tun >/dev/null 2>&1 
    12         [ -d $RUN_D ] || mkdir -p $RUN_D 
    13         config_get ipaddr lan ipaddr 
    14         /usr/sbin/chilli --dns1="$ipaddr" 
     10        . /lib/functions/network.sh 
     11 
     12        local ipaddr 
     13        network_get_ipaddr ipaddr lan && \ 
     14                service_start /usr/sbin/chilli --dns1="$ipaddr" 
    1515} 
    1616 
    1717stop() { 
    18         [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 
     18        service_stop /usr/sbin/chilli 
    1919} 
Note: See TracChangeset for help on using the changeset viewer.