24 lines
255 B
Plaintext
24 lines
255 B
Plaintext
|
#!/bin/sh /etc/rc.common
|
||
|
# Copyright (C) 2006 OpenWrt.org
|
||
|
|
||
|
START=60
|
||
|
BIN=totd
|
||
|
RUN_D=/var/run
|
||
|
PID_F=$RUN_D/$BIN.pid
|
||
|
|
||
|
|
||
|
start() {
|
||
|
mkdir -p $RUN_D
|
||
|
$BIN -c /etc/totd.conf
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
[ -f $PID_F ] && kill $(cat $PID_F)
|
||
|
}
|
||
|
|
||
|
restart() {
|
||
|
stop
|
||
|
sleep 1
|
||
|
start
|
||
|
}
|