mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-24 09:41:50 +02:00
Test revert
This commit is contained in:
@@ -28,24 +28,16 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
|||||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||||
S6_SERVICES_GRACETIME=0
|
S6_SERVICES_GRACETIME=0
|
||||||
|
|
||||||
# Global LSIO modifications
|
# Allow UID and GID setting
|
||||||
ARG CONFIGLOCATION="/config/addons_config/calibre"
|
RUN sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
|
||||||
# hadolint ignore=SC2015, SC2013
|
&& sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \
|
||||||
RUN \
|
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \
|
||||||
# Avoid custom-init.d duplications
|
|
||||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
|
||||||
\
|
\
|
||||||
# Create new config folder if needed
|
# Change home folder location
|
||||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
&& sed -i 's|/config|/config/addons_config/calibre|g' /defaults/* \
|
||||||
\
|
&& sed -i 's|/config|/config/addons_config/calibre|g' /etc/cont-init.d/* \
|
||||||
# Allow UID and GID setting
|
&& sed -i 's|/config|/config/addons_config/calibre|g' /etc/services.d/*/run \
|
||||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i '1a PUID="$(if [ -n $(bashio::config 'PUID') ]; then echo "0"; else bashio::config 'PUID'; fi)"' "$file" && sed -i '1a PGID="$(if [ -n $(bashio::config 'PGID') ]; then echo "0"; else bashio::config 'PGID'; fi)"' "$file"; done \
|
&& usermod --home /config/addons_config/calibre abc
|
||||||
\
|
|
||||||
# Correct config location
|
|
||||||
&& for file in $(grep -Esril "/config[ '\"/]|/config\$" /etc/logrotate.d /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
|
||||||
\
|
|
||||||
# Avoid chmod /config
|
|
||||||
&& for files in /etc/services.d/*/* /etc/cont-init.d/* /etc/s6-overlay/s6-rc.d/*/*;do if [ -f $files ] && [[ ! -z $(awk '/chown.*abc:abc.*\\/,/.*\/config( |$)/{print FILENAME}' "$files") ]] ; then sed -i "s|/config$|/data|g" "$files"; fi ;done
|
|
||||||
|
|
||||||
# Specific images modifications
|
# Specific images modifications
|
||||||
RUN \
|
RUN \
|
||||||
|
|||||||
Reference in New Issue
Block a user