packages/totd: use new service functions
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28928 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
804b8bbb45
commit
bc5822e1f6
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user