mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-04 13:08:45 +02:00
Update 00-data_location.sh
This commit is contained in:
@@ -10,7 +10,7 @@ LOCATION=$(bashio::config 'data_location')
|
|||||||
|
|
||||||
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
|
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
|
||||||
# Default location
|
# Default location
|
||||||
LOCATION="/config/addons_config/addons_config/calibre"
|
LOCATION="/config/addons_config/calibre"
|
||||||
else
|
else
|
||||||
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
|
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
|
||||||
|
|
||||||
@@ -33,9 +33,9 @@ fi
|
|||||||
bashio::log.info "Setting data location to $LOCATION"
|
bashio::log.info "Setting data location to $LOCATION"
|
||||||
sed -i "1a export HOME=$LOCATION" /etc/services.d/web/run
|
sed -i "1a export HOME=$LOCATION" /etc/services.d/web/run
|
||||||
sed -i "1a export FM_HOME=$LOCATION" /etc/services.d/web/run
|
sed -i "1a export FM_HOME=$LOCATION" /etc/services.d/web/run
|
||||||
sed -i "s|/config/addons_config/addons_config/calibre|$LOCATION|g" /defaults/*
|
sed -i "s|/config/addons_config/calibre|$LOCATION|g" /defaults/*
|
||||||
sed -i "s|/config/addons_config/addons_config/calibre|$LOCATION|g" /etc/cont-init.d/*
|
sed -i "s|/config/addons_config/calibre|$LOCATION|g" /etc/cont-init.d/*
|
||||||
sed -i "s|/config/addons_config/addons_config/calibre|$LOCATION|g" /etc/services.d/*/run
|
sed -i "s|/config/addons_config/calibre|$LOCATION|g" /etc/services.d/*/run
|
||||||
usermod --home "$LOCATION" abc
|
usermod --home "$LOCATION" abc
|
||||||
|
|
||||||
# Create folder
|
# Create folder
|
||||||
|
|||||||
Reference in New Issue
Block a user