packages/ipv6/ptrtd/files/ptrtd.init

27 lines
296 B
Plaintext
Raw Normal View History

#!/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
}