mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-23 04:56:28 +01:00
Create 41-modifications.sh
This commit is contained in:
19
organizr/rootfs/etc/cont-init.d/41-modifications.sh
Normal file
19
organizr/rootfs/etc/cont-init.d/41-modifications.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
set -e
|
||||
|
||||
PUID="$(bashio::config 'PUID' || echo 1000)"
|
||||
PGID="$(bashio::config 'PGID' || echo 1000)"
|
||||
|
||||
# Only act if the symlink target does not exist
|
||||
if [[ -d /data/organizr/www/organizr ]] && [[ ! -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