Changeset 31946


Ignore:
Timestamp:
2012-05-28T17:20:46+02:00 (5 years ago)
Author:
jow
Message:

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

Location:
packages/net/pepperspot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/net/pepperspot/Makefile

    r21017 r31946  
    11# 
    2 # Copyright (C) 2008-2010 OpenWrt.org 
     2# Copyright (C) 2008-2012 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010PKG_NAME:=pepperspot 
    1111PKG_VERSION:=0.3 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
  • packages/net/pepperspot/files/pepperspot.init

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