mirror of
https://github.com/openwrt/packages.git
synced 2026-01-08 03:30:19 +04:00
databag: add package
Signed-off-by: Roland Osborne <roland.osborne@gmail.com>
This commit is contained in:
committed by
Rosen Penev
parent
9877676890
commit
5912206b83
24
net/databag/files/databag.init
Normal file
24
net/databag/files/databag.init
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=50
|
||||
STOP=51
|
||||
|
||||
start_service() {
|
||||
# load config
|
||||
config_load databag
|
||||
config_get store_path "config" "store_path" "/tmp/databag/store"
|
||||
config_get service_port "config" "service_port" "7001"
|
||||
|
||||
# init store
|
||||
mkdir -p "${store_path}"
|
||||
cp -n "/usr/share/databag/databag.db" "${store_path}"
|
||||
|
||||
# setup serice
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/bin/databag"
|
||||
procd_append_param command -p "${service_port}"
|
||||
procd_append_param command -s "${store_path}"
|
||||
procd_append_param command -w "/usr/share/databag/web/build"
|
||||
procd_close_instance
|
||||
}
|
||||
Reference in New Issue
Block a user