mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 11:39:17 +00:00
23 lines
406 B
Plaintext
23 lines
406 B
Plaintext
|
#!/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
|
||
|
}
|