Update 00-folders.sh

This commit is contained in:
Alexandre
2023-04-23 19:03:40 +02:00
committed by GitHub
parent 230893f735
commit 75a238650c

View File

@@ -1,6 +1,14 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then
PUID="$(bashio::config "PUID")"
PGID="$(bashio::config "PGID")"
bashio::log.green "Setting user to $PUID:$PGID"
id -u photoprism &>/dev/null || usermod -o -u "$PUID" photoprism || true
id -g photoprism &>/dev/null || groupmod -o -g "$PGID" photoprism || true
fi
bashio::log.info "Preparing scripts"
echo "... creating structure"
mkdir -p \