mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Bug fix/enhancement: Check if we're the owner of /data and set ownership if not. Also pre-create /data/models folder
This commit is contained in:
parent
d15d8f6644
commit
93f074241d
1 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ DATA_DIRS=(
|
|||
"/data/m3us"
|
||||
"/data/epgs"
|
||||
"/data/plugins"
|
||||
"/data/models"
|
||||
)
|
||||
|
||||
APP_DIRS=(
|
||||
|
|
@ -56,5 +57,11 @@ if [ "$(id -u)" = "0" ]; then
|
|||
chown -R postgres:postgres /data/db
|
||||
fi
|
||||
|
||||
# Fix /data directory ownership (non-recursive)
|
||||
if [ -d "/data" ] && [ "$(stat -c '%u:%g' /data)" != "$PUID:$PGID" ]; then
|
||||
echo "Fixing ownership for /data (non-recursive)"
|
||||
chown $PUID:$PGID /data
|
||||
fi
|
||||
|
||||
chmod +x /data
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue