packages/ptrtd: use new service functions

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28926 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico
2011-11-09 23:49:21 +00:00
parent 9df4b4e285
commit 0ce1af9dfd
2 changed files with 5 additions and 16 deletions

View File

@ -1,26 +1,15 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2011 OpenWrt.org
START=60
BIN=ptrtd
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
PREFIX="3ffe:abcd:1234:9876::"
LEN=64
start() {
mkdir -p $RUN_D
$BIN -p $PREFIX -l $LEN
service_start /usr/sbin/ptrtd -p $PREFIX -l $LEN
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
restart() {
stop
sleep 1
start
service_stop /usr/sbin/ptrtd
}