mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-09 23:40:59 +02:00
Immich addition
This commit is contained in:
21
immich/rootfs/etc/cont-init.d/20-folders.sh
Normal file
21
immich/rootfs/etc/cont-init.d/20-folders.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#################
|
||||
# DATA_LOCATION #
|
||||
#################
|
||||
|
||||
PUID="$(bashio::config 'PUID')"
|
||||
PGID="$(bashio::config 'PGID')"
|
||||
|
||||
bashio::log.info "Setting data location"
|
||||
DATA_LOCATION="$(bashio::config 'data_location')"
|
||||
|
||||
echo "... check $DATA_LOCATION folder exists"
|
||||
mkdir -p "$DATA_LOCATION"
|
||||
|
||||
echo "... setting permissions"
|
||||
chown -R "$PUID":"$PGID" "$DATA_LOCATION"
|
||||
|
||||
echo "... correcting official script"
|
||||
for file in $(grep -sril '/photos' /etc); do sed -i "s|/photos|$DATA_LOCATION|g" "$file"; done
|
||||
Reference in New Issue
Block a user