mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-11 18:11:29 +02:00
Adapt location
This commit is contained in:
@@ -11,10 +11,11 @@ if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then LOCATION=/config/addons_co
|
|||||||
|
|
||||||
# Set data location
|
# Set data location
|
||||||
bashio::log.info "Setting data location to $LOCATION"
|
bashio::log.info "Setting data location to $LOCATION"
|
||||||
for file in $(grep -Esril "/config[ '\"/]|/config\$" /etc /defaults); do sed -Ei "s=(/config)+(/| |$|\"|\')=$LOCATION\2=g" $file; done
|
for file in $(grep -sril "/config" /etc /defaults); do sed -i "s=/config=$LOCATION=g" $file; done
|
||||||
|
for file in $(grep -sril "/usr/share/jellyfin/web" /etc /defaults); do sed -i "s=/usr/share/jellyfin/web=$LOCATION/web=g" $file; done
|
||||||
|
|
||||||
echo "Creating $LOCATION"
|
echo "Creating $LOCATION"
|
||||||
mkdir -p "$LOCATION"
|
mkdir -p "$LOCATION" "$LOCATION"/data "$LOCATION"/cache "$LOCATION"/log "$LOCATION"/web
|
||||||
|
|
||||||
bashio::log.info "Setting ownership to $PUID:$PGID"
|
bashio::log.info "Setting ownership to $PUID:$PGID"
|
||||||
chown "$PUID":"$PGID" "$LOCATION"
|
chown "$PUID":"$PGID" "$LOCATION"
|
||||||
|
|||||||
Reference in New Issue
Block a user