Files
packages/utils/boxbackup/files/bbstored.init
cshore 94b4825f79 [packages] utils/boxbackup: Added boxbackup. Currently only the server is fully integrated (init script and uci), but it compiles and the server works.
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28023 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-08-16 22:10:23 +00:00

32 lines
426 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2010-2011 Openwrt.org
START=90
local NORUN=0
start() {
. /lib/functions/bbstored.sh
create_config
if [ "$EXTERNAL_CONFIG" -eq 1 ]
then
BXBK_CONFIG_FILE="$EXTERNAL_CONF_FILE"
fi
[ "$NORUN" != "1" ] && /usr/sbin/bbstored "$BXBK_CONFIG_FILE"
}
stop() {
. /lib/functions/bbstored.sh
if [ -f "$PID_FILE" ]
then
kill $(cat "$PID_FILE")
else
killall bbstored
fi
}