Update service-filebrowser.json to conditionally initialize config and add user only if database does not exist

This commit is contained in:
gyurix
2025-04-27 11:17:26 +02:00
parent 02cebcf6b8
commit dd84f317d4

View File

@@ -61,7 +61,7 @@
"DEPEND": [],
"START_ON_BOOT": "false",
"ENTRYPOINT": "sh",
"CMD": "/filebrowser config init && /filebrowser users add \"$FILEBROWSER_USER\" \"$FILEBROWSER_PASS\" --perm.admin && /filebrowser",
"CMD": "if [ ! -f /database.db ]; then /filebrowser config init && /filebrowser users add \"$FILEBROWSER_USER\" \"$FILEBROWSER_PASS\" --perm.admin && /filebrowser ; else /filebrowser ; fi",
"PRE_START": "null",
"POST_START": [
"firewall-filebrowser",