packages/ipv6/ptrtd/files/ptrtd.init
florian 6229f2c2aa Add ptrtd (#1402)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6388 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-02-26 11:37:12 +00:00

27 lines
296 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006 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
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}
restart() {
stop
sleep 1
start
}