dafb4624eba5facf18a45299b5f1ab272bc36ff1
[openwrt.git] / openwrt / package / rrdcollect / files / rrdcollect.init
1 #!/bin/sh
2
3 BIN=rrdcollect
4 DEFAULT=/etc/default/$BIN
5 RUN_D=/var/run
6 RRA_D=/var/lib/rra
7 PID_F=$RUN_D/$BIN.pid
8 [ -f $DEFAULT ] && . $DEFAULT
9
10 case $1 in
11 start)
12 mkdir -p $RUN_D
13 mkdir -p $RRA_D
14 $BIN $OPTIONS
15 ;;
16 stop)
17 [ -f $PID_F ] && kill $(cat $PID_F)
18 ;;
19 *)
20 echo "usage: $0 (start|stop)"
21 exit 1
22 esac
23
24 exit $?
This page took 0.041065 seconds and 3 git commands to generate.