add filebrowser (#56)

This commit is contained in:
Muhammad Atif Ali
2023-09-27 17:16:03 +03:00
committed by GitHub
parent c3d8a9949c
commit 59243bdf23
5 changed files with 257 additions and 1 deletions

21
filebrowser/run.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env sh
BOLD='\033[0;1m'
echo "$${BOLD}Installing filebrowser \n\n"
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
echo "🥳 Installation comlete! \n\n"
echo "👷 Starting filebrowser in background... \n\n"
ROOT_DIR=${FOLDER}
ROOT_DIR=$${ROOT_DIR/\~/$HOME}
echo "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
echo "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}' \n\n"
filebrowser --noauth --root $ROOT_DIR --port ${PORT} >${LOG_PATH} 2>&1 &
echo "📝 Logs at ${LOG_PATH} \n\n"