Support dufs fileserver

This commit is contained in:
archandanime
2024-01-10 15:38:33 +07:00
committed by gtxaspec
parent 1e1383a78f
commit f4373856cc
6 changed files with 66 additions and 3 deletions

BIN
SD_ROOT/wz_mini/bin/dufs Executable file

Binary file not shown.

32
SD_ROOT/wz_mini/etc/dufs.yaml Executable file
View File

@@ -0,0 +1,32 @@
# dufs configuration file
# Check https://github.com/sigoden/dufs for more info
serve-path: '/opt'
bind: 0.0.0.0
port: 5000
path-prefix:
#hidden:
# - tmp
# - '*.log'
# - '*.lock'
auth:
# - admin:admin@/:rw
# - user:pass@/src:rw,/share
# - '@/' # According to the YAML spec, quoting is required.
allow-all: false
allow-upload: true
allow-delete: true
allow-search: true
allow-symlink: true
allow-archive: true
enable-cors: true
render-index: false
render-try-index: false
render-spa: false
#assets: ./assets/
#log-format: '$remote_addr "$request" $status $http_user_agent'
#compress: low
#tls-cert: tests/data/cert.pem
#tls-key: tests/data/key_pkcs1.pem

View File

@@ -0,0 +1,25 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides:
# Short-Description: Start dufs file server
# Description: Run the dufs file server daemon
### END INIT INFO
. /opt/wz_mini/wz_mini.conf
case "$1" in
start)
echo "#####$(basename "$0")#####"
if [[ "$ENABLE_FILESERVER" == "true" ]]; then
echo "Starting dufs file server"
/opt/wz_mini/bin/dufs -c /opt/wz_mini/etc/dufs.yaml &
fi
;;
*)
echo "Usage: $0 {start}"
exit 1
;;
esac

View File

@@ -1 +1 @@
2024-01-09_23:55:50
2024-01-10_15:32:41

View File

@@ -125,5 +125,8 @@ WEB_SERVER_AUTH="true"
WEB_SERVER_LOGIN="admin"
WEB_SERVER_PASSWORD=""
####FILE SERVER####
ENABLE_FILESERVER="false"
#####SCRIPTING#####
CUSTOM_SCRIPT_PATH=""