mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-03-08 13:19:05 +00:00
[Fix] Filebrowser - Add Static Path for DB (#2207)
This commit is contained in:
parent
c5101d3358
commit
ccc71a7225
@ -76,15 +76,21 @@ if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
|
|||||||
curl -fsSL https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null
|
curl -fsSL https://github.com/filebrowser/filebrowser/releases/latest/download/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin &>/dev/null
|
||||||
msg_ok "Installed ${APP}"
|
msg_ok "Installed ${APP}"
|
||||||
|
|
||||||
|
msg_info "Creating FileBrowser directory"
|
||||||
|
mkdir -p /var/lib/filebrowser
|
||||||
|
chown root:root /var/lib/filebrowser
|
||||||
|
chmod 755 /var/lib/filebrowser
|
||||||
|
msg_ok "Directory created successfully"
|
||||||
|
|
||||||
read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt
|
read -r -p "Would you like to use No Authentication? (y/N): " auth_prompt
|
||||||
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${auth_prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Configuring No Authentication"
|
msg_info "Configuring No Authentication"
|
||||||
filebrowser config init -a '0.0.0.0' &>/dev/null
|
filebrowser config init -a '0.0.0.0' --database /var/lib/filebrowser/filebrowser.db &>/dev/null
|
||||||
filebrowser config set -a '0.0.0.0' --auth.method=noauth &>/dev/null
|
filebrowser config set -a '0.0.0.0' --auth.method=noauth &>/dev/null
|
||||||
msg_ok "No Authentication configured"
|
msg_ok "No Authentication configured"
|
||||||
else
|
else
|
||||||
msg_info "Setting up default authentication"
|
msg_info "Setting up default authentication"
|
||||||
filebrowser config init -a '0.0.0.0' &>/dev/null
|
filebrowser config init -a '0.0.0.0' --database /var/lib/filebrowser/filebrowser.db &>/dev/null
|
||||||
filebrowser config set -a '0.0.0.0' &>/dev/null
|
filebrowser config set -a '0.0.0.0' &>/dev/null
|
||||||
filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null
|
filebrowser users add admin helper-scripts.com --perm.admin &>/dev/null
|
||||||
msg_ok "Default authentication configured (admin:helper-scripts.com)"
|
msg_ok "Default authentication configured (admin:helper-scripts.com)"
|
||||||
@ -98,11 +104,12 @@ After=network-online.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/root/
|
WorkingDirectory=/var/lib/filebrowser/
|
||||||
ExecStart=/usr/local/bin/filebrowser -r /
|
ExecStart=/usr/local/bin/filebrowser -r / --database /var/lib/filebrowser/filebrowser.db
|
||||||
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=default.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now filebrowser.service
|
systemctl enable -q --now filebrowser.service
|
||||||
msg_ok "Service created successfully"
|
msg_ok "Service created successfully"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user