mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 19:34:05 +02:00
Update 00-folders.sh
This commit is contained in:
@@ -2,9 +2,22 @@
|
|||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
PUID="$(bashio::config 'PUID')"
|
PUID="$(bashio::config 'PUID' || echo 1000)"
|
||||||
PGID="$(bashio::config 'PGID')"
|
PGID="$(bashio::config 'PGID' || echo 1000)"
|
||||||
|
|
||||||
echo "Creating /data/organizr"
|
echo "Creating /data/organizr"
|
||||||
mkdir -p /data/organizr
|
mkdir -p /data/organizr
|
||||||
chown -R "$PUID:$PGID" /data
|
chown "$PUID:$PGID" /data/organizr
|
||||||
|
|
||||||
|
# Only act if the symlink target does not exist
|
||||||
|
if [[ ! -f /data/organizr/www/organizr/api/data/organizr/default.php ]]; then
|
||||||
|
echo "Fix issues in upstream"
|
||||||
|
mkdir -p /data/organizr/www/organizr/api/data/organizr
|
||||||
|
if [[ -f /data/organizr/www/organizr/api/config/default.php ]]; then
|
||||||
|
ln -sf /data/organizr/www/organizr/api/config/default.php /data/organizr/www/organizr/api/data/organizr/default.php
|
||||||
|
else
|
||||||
|
echo "WARNING: /data/organizr/www/organizr/api/config/default.php does not exist, cannot create symlink"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R "$PUID:$PGID" /data/organizr
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user