Ignore:
Timestamp:
2011-11-13T23:15:55+01:00 (4 years ago)
Author:
nico
Message:

packages/ndyndns: use new service functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/ndyndns/files/ndyndns.init

    r10615 r29064  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2007 OpenWrt.org 
     2# Copyright (C) 2007-2011 OpenWrt.org 
    33 
    44START=80 
    5 DEFAULT=/etc/default/ndyndns 
     5 
     6include /lib/network 
    67 
    78start() { 
    8         [ -f $DEFAULT ] && . $DEFAULT 
    9  
    10         . /etc/functions.sh 
    11         include /lib/network 
    129        scan_interfaces 
    13         /usr/sbin/ndyndns -c $CHROOT -f $CONFIG -i $(config_get wan ifname) $OPTIONS 
     10        config_get wan_if 'wan' 'ifname' 
     11        [ -n "$wan_if" ] || return 1 
     12        [ -f /etc/ndyndns/ndyndns.conf ] || { 
     13                echo "$0: missing config file '/etc/ndyndns/ndyndns.conf'" 1>&2 
     14                return 1 
     15        } 
     16        service_start /usr/sbin/ndyndns -c /etc/ndyndns -f /etc/ndyndns/ndyndns.conf -i $wan_if 
    1417} 
    1518 
    1619stop() { 
    17         killall ndyndns 
     20        service_stop /usr/sbin/ndyndns 
    1821} 
Note: See TracChangeset for help on using the changeset viewer.