databag/net/host/openwrt/files/databag.init

23 lines
406 B
Plaintext
Raw Normal View History

2024-01-12 21:34:32 +00:00
#!/bin/sh /etc/rc.common
START=10
STOP=15
config_databag() {
config_get store_path "$1" store_path "/tmp/store"
config_get service_port "$1" service_port "7001"
mkdir -p "${store_path}/assets"
cp -n /opt/databag/databag.db ${store_path}
/usr/bin/databag ${service_port} ${store_path}
}
start() {
config_load databag
config_foreach config_databag databag
}
stop() {
killall databag
}