mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01: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
|
||||
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"
|
||||
mkdir -p "$LOCATION"
|
||||
mkdir -p "$LOCATION" "$LOCATION"/data "$LOCATION"/cache "$LOCATION"/log "$LOCATION"/web
|
||||
|
||||
bashio::log.info "Setting ownership to $PUID:$PGID"
|
||||
chown "$PUID":"$PGID" "$LOCATION"
|
||||
|
||||
Reference in New Issue
Block a user