mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-16 09:28:20 +01:00
First working version https://github.com/alexbelgium/hassio-addons/issues/747
This commit is contained in:
@@ -28,12 +28,12 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
RUN \
|
||||
# Custom scripts
|
||||
sed -i "1a /./entrypoint.sh" /usr/local/bin/docker-entrypoint.sh && \
|
||||
# Change data folder
|
||||
sed -i "s|/fgc|/data|g" /usr/local/bin/docker-entrypoint.sh && \
|
||||
sed -i 's|"$@"|$CMD_PARAMETERS|g' /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
sed -i "s|/fgc|/data|g" /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Define subreaper
|
||||
ENV TINI_SUBREAPER=true
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
@@ -73,11 +73,11 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get
|
||||
# 4 Entrypoint #
|
||||
################
|
||||
|
||||
#RUN chmod 777 /entrypoint.sh
|
||||
RUN chmod 777 /entrypoint.sh
|
||||
WORKDIR /data
|
||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
||||
#CMD [ "/entrypoint.sh" ]
|
||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
ENTRYPOINT [ "/usr/bin/env" ]
|
||||
CMD [ "/entrypoint.sh" ]
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
############
|
||||
# 5 Labels #
|
||||
|
||||
@@ -76,6 +76,6 @@
|
||||
},
|
||||
"slug": "free_games_claimer",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"version": "1.4-test7",
|
||||
"version": "1.4",
|
||||
"webui": "[PROTO:ssl]://[HOST]:[PORT:6080]"
|
||||
}
|
||||
}
|
||||
@@ -5,26 +5,26 @@
|
||||
# Initialize #
|
||||
##############
|
||||
|
||||
# Delete file if existing
|
||||
if [ -f /data/config.env ]; then
|
||||
rm /data/config.env
|
||||
# Use new config file
|
||||
CONFIG_HOME="$(bashio::config "CONFIG_LOCATION")"
|
||||
CONFIG_HOME="$(dirname "$CONFIG_HOME")"
|
||||
if [ ! -f "$CONFIG_HOME"/config.env ]; then
|
||||
# Copy default config.env
|
||||
cp /templates/config.env "$CONFIG_HOME"/config.env
|
||||
chmod 777 "$CONFIG_HOME"/config.env
|
||||
bashio::log.warning "A default config.env file was copied in $CONFIG_HOME. Please customize according to https://github.com/vogler/free-games-claimer/tree/main#configuration--options and restart the add-on"
|
||||
else
|
||||
bashio::log.warning "The config.env file found in $CONFIG_HOME will be used. Please customize according to https://github.com/vogler/free-games-claimer/tree/main#configuration--options and restart the add-on"
|
||||
fi
|
||||
|
||||
# Use new config file
|
||||
HOME="$(bashio::config "CONFIG_LOCATION")"
|
||||
HOME="$(dirname "$HOME")"
|
||||
if [ ! -f "$HOME"/config.env ]; then
|
||||
# Copy default config.env
|
||||
cp /templates/config.env "$HOME"/config.env
|
||||
chmod 777 "$HOME"/config.env
|
||||
bashio::log.warning "A default config.env file was copied in $HOME. Please customize according to https://github.com/vogler/free-games-claimer/tree/main#configuration--options and restart the add-on"
|
||||
else
|
||||
bashio::log.warning "The config.env file found in $HOME will be used. Please customize according to https://github.com/vogler/free-games-claimer/tree/main#configuration--options and restart the add-on"
|
||||
fi
|
||||
cp "$HOME"/config.env /data/
|
||||
# Copy new file
|
||||
\cp "$CONFIG_HOME"/config.env /data/
|
||||
|
||||
# Permissions
|
||||
chmod -R 777 "$HOME"
|
||||
chmod -R 777 "$CONFIG_HOME"
|
||||
|
||||
# Export variables
|
||||
source "$CONFIG_HOME"/config.env
|
||||
|
||||
##############
|
||||
# Launch App #
|
||||
@@ -38,8 +38,5 @@ echo " "
|
||||
bashio::log.info "Starting the app with arguments $CMD_ARGUMENTS"
|
||||
echo " "
|
||||
|
||||
sed -i '$d' docker-entrypoint.sh
|
||||
./docker-entrypoint.sh
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
$CMD_ARGUMENTS
|
||||
docker-entrypoint.sh $CMD_ARGUMENTS
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SHOW=1
|
||||
WIDTH=1280
|
||||
HEIGHT=1280
|
||||
export SHOW=1
|
||||
export WIDTH=1280
|
||||
export HEIGHT=1280
|
||||
Reference in New Issue
Block a user