[packages] utils/boxbackup: Added boxbackup. Currently only the server is fully...
[openwrt/svn-archive/archive.git] / utils / boxbackup / files / bbstored.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2010-2011 Openwrt.org
3
4 START=90
5
6
7 local NORUN=0
8
9 start() {
10 . /lib/functions/bbstored.sh
11
12 create_config
13
14 if [ "$EXTERNAL_CONFIG" -eq 1 ]
15 then
16 BXBK_CONFIG_FILE="$EXTERNAL_CONF_FILE"
17 fi
18 [ "$NORUN" != "1" ] && /usr/sbin/bbstored "$BXBK_CONFIG_FILE"
19 }
20
21 stop() {
22 . /lib/functions/bbstored.sh
23
24 if [ -f "$PID_FILE" ]
25 then
26 kill $(cat "$PID_FILE")
27 else
28 killall bbstored
29 fi
30 }
31