mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2025-08-09 20:14:04 +00:00
Support dufs fileserver
This commit is contained in:
BIN
SD_ROOT/wz_mini/bin/dufs
Executable file
BIN
SD_ROOT/wz_mini/bin/dufs
Executable file
Binary file not shown.
32
SD_ROOT/wz_mini/etc/dufs.yaml
Executable file
32
SD_ROOT/wz_mini/etc/dufs.yaml
Executable 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
|
25
SD_ROOT/wz_mini/etc/init.d/S13fileserver
Normal file
25
SD_ROOT/wz_mini/etc/init.d/S13fileserver
Normal 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
|
||||
|
@@ -1 +1 @@
|
||||
2024-01-09_23:55:50
|
||||
2024-01-10_15:32:41
|
||||
|
@@ -125,5 +125,8 @@ WEB_SERVER_AUTH="true"
|
||||
WEB_SERVER_LOGIN="admin"
|
||||
WEB_SERVER_PASSWORD=""
|
||||
|
||||
####FILE SERVER####
|
||||
ENABLE_FILESERVER="false"
|
||||
|
||||
#####SCRIPTING#####
|
||||
CUSTOM_SCRIPT_PATH=""
|
||||
|
Reference in New Issue
Block a user