Changeset 28928


Ignore:
Timestamp:
2011-11-10T00:49:26+01:00 (6 years ago)
Author:
nico
Message:

packages/totd: use new service functions

Location:
packages/ipv6/totd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • packages/ipv6/totd/Makefile

    r27610 r28928  
    1010PKG_NAME:=totd 
    1111PKG_VERSION:=1.5.1 
    12 PKG_RELEASE:=1 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
  • packages/ipv6/totd/files/totd.init

    r6500 r28928  
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2006 OpenWrt.org 
     2# Copyright (C) 2006-2011 OpenWrt.org 
    33 
    44START=60 
    5 BIN=totd 
    6 RUN_D=/var/run 
    7 PID_F=$RUN_D/$BIN.pid 
    85 
     6SERVICE_USE_PID=1 
    97 
    108start() { 
    11         mkdir -p $RUN_D 
    12         $BIN -c /etc/totd.conf 
     9        service_start /usr/sbin/totd -c /etc/totd.conf 
    1310} 
    1411 
    1512stop() { 
    16         [ -f $PID_F ] && kill $(cat $PID_F) 
     13        service_stop /usr/sbin/totd 
    1714} 
    18  
    19 restart() { 
    20         stop 
    21         sleep 1 
    22         start 
    23 } 
Note: See TracChangeset for help on using the changeset viewer.