mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 18:01:03 +01:00
Align with /config/data
This commit is contained in:
@@ -35,11 +35,11 @@ VOLUME [ "/sys/fs/cgroup" ]
|
||||
# hadolint ignore=SC2015,DL4006,SC2013,SC2086
|
||||
RUN \
|
||||
# Change home folder location
|
||||
usermod --home /share/webtop_kde abc
|
||||
usermod --home /config/data_kde abc
|
||||
|
||||
# Global LSIO modifications
|
||||
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_lsio.sh" "/ha_lsio.sh"
|
||||
ARG CONFIGLOCATION="/share/webtop_kde"
|
||||
ARG CONFIGLOCATION="/config/data_kde"
|
||||
RUN chmod 744 /ha_lsio.sh && if grep -qr "lsio" /etc; then /ha_lsio.sh "$CONFIGLOCATION"; fi && rm /ha_lsio.sh
|
||||
|
||||
##################
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
"/dev/nvme2"
|
||||
],
|
||||
"environment": {
|
||||
"FM_HOME": "/share/webtop",
|
||||
"HOME": "/share/webtop",
|
||||
"FM_HOME": "/config/data",
|
||||
"HOME": "/config/data",
|
||||
"PGID": "0",
|
||||
"PUID": "0",
|
||||
"START_DOCKER": "false",
|
||||
@@ -142,6 +142,6 @@
|
||||
"tmpfs": true,
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"version": "0.1",
|
||||
"version": "0.2",
|
||||
"video": true
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ LOCATION=$(bashio::config 'data_location')
|
||||
|
||||
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
|
||||
# Default location
|
||||
LOCATION="/share/webtop_kde"
|
||||
LOCATION="/config/data_kde"
|
||||
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"
|
||||
|
||||
@@ -25,7 +25,7 @@ else
|
||||
done
|
||||
|
||||
if [ -z "$LOCATIONOK" ]; then
|
||||
LOCATION="/share/webtop_kde"
|
||||
LOCATION="/config/data_kde"
|
||||
bashio::log.fatal "Your data_location value can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $LOCATION"
|
||||
fi
|
||||
|
||||
@@ -45,7 +45,7 @@ done
|
||||
# Correct home location
|
||||
for folders in /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d; do
|
||||
if [ -d "$folders" ]; then
|
||||
sed -i "s|/share/webtop_kde|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true
|
||||
sed -i "s|/config/data_kde|$LOCATION|g" $(find "$folders" -type f) &>/dev/null || true
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user