packages/totd: use new service functions
authorNicolas Thill <nico@openwrt.org>
Wed, 9 Nov 2011 23:49:26 +0000 (23:49 +0000)
committerNicolas Thill <nico@openwrt.org>
Wed, 9 Nov 2011 23:49:26 +0000 (23:49 +0000)
SVN-Revision: 28928

ipv6/totd/Makefile
ipv6/totd/files/totd.init

index c47cf022590f01c24e0159bc307f1e6e8a902bb9..ed15390e45be9fa9737eabd2ed1d7f4eade38ef8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=totd
 PKG_VERSION:=1.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.dillema.net/software/totd
index c12cc41cdcfc5fd4ad5a908c264cc7d4eeb211d8..9c2dd74e9957a177e86dc176a8d56e7eb859a5f7 100644 (file)
@@ -1,23 +1,14 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 
 START=60
-BIN=totd
-RUN_D=/var/run
-PID_F=$RUN_D/$BIN.pid
 
+SERVICE_USE_PID=1
 
 start() {
-       mkdir -p $RUN_D
-       $BIN -c /etc/totd.conf
+       service_start /usr/sbin/totd -c /etc/totd.conf
 }
 
 stop() {
-       [ -f $PID_F ] && kill $(cat $PID_F)
-}
-
-restart() {
-       stop
-       sleep 1
-       start
+       service_stop /usr/sbin/totd
 }