mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Create 00-data_location.sj
This commit is contained in:
15
jellyfin/rootfs/etc/cont-init.d/00-data_location.sj
Normal file
15
jellyfin/rootfs/etc/cont-init.d/00-data_location.sj
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
PUID=$(bashio::config "PUID")
|
||||
PGID=$(bashio::config "PGID")
|
||||
LOCATION=$(bashio::config 'data_location')
|
||||
|
||||
bashio::log.info "Setting data location to $LOCATION"
|
||||
sed -i "s|/config|$LOCATION|g" /etc/services.d/jellyfin/run
|
||||
sed -i "s|/config|$LOCATION|g" /etc/cont-init.d/10-adduser
|
||||
sed -i "s|/config|$LOCATION|g" /etc/cont-init.d/30-config
|
||||
|
||||
echo "Creating $LOCATION"
|
||||
mkdir -p "$LOCATION"
|
||||
|
||||
bashio::log.info "Setting ownership to $PUID:$GUID"
|
||||
chown "$PUID":"$GUID" "$LOCATION"
|
||||
Reference in New Issue
Block a user