mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 05:55:13 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
0d155c70be
commit
32600acc60
14258 files changed
+3954570
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=10
|
||||
|
||||
CONF="filebrowser"
|
||||
PROG="/usr/bin/filebrowser"
|
||||
CONF_PATH="/etc/filebrowser/config.yaml"
|
||||
PID_FILE="/var/run/filebrowser.pid"
|
||||
|
||||
start() {
|
||||
config_load "$CONF"
|
||||
|
||||
local enabled
|
||||
config_get_bool enabled "config" "enabled" "0"
|
||||
[ "$enabled" -eq "1" ] || return 1
|
||||
|
||||
local listen_port root_path base_url
|
||||
config_get listen_port "config" "listen_port" "8989"
|
||||
config_get root_path "config" "root_path" "/"
|
||||
config_get base_url "config" "base_url" "/"
|
||||
|
||||
echo "Starting filebrowser..."
|
||||
start-stop-daemon -S -q -b -m -p "$PID_FILE" -x "$PROG" -- -c "$CONF_PATH"
|
||||
}
|
||||
|
||||
stop() {
|
||||
kill -9 `pidof filebrowser | sed "s/$$//g"` 2>/dev/null
|
||||
rm -f "$PID_FILE"
|
||||
echo "filebrowser stopped"
|
||||
}
|
||||
Reference in new issue
Block a user