mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Various tests https://github.com/alexbelgium/hassio-addons/issues/747
This commit is contained in:
@@ -69,11 +69,11 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get
|
|||||||
# 4 Entrypoint #
|
# 4 Entrypoint #
|
||||||
################
|
################
|
||||||
|
|
||||||
#RUN chmod 777 /entrypoint.sh
|
RUN chmod 777 /entrypoint.sh
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
ENTRYPOINT [ "/usr/bin/env" ]
|
||||||
#CMD [ "/entrypoint.sh" ]
|
CMD [ "/entrypoint.sh" ]
|
||||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
############
|
############
|
||||||
# 5 Labels #
|
# 5 Labels #
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ This addon is based on the docker image https://github.com/vogler/free-games-cla
|
|||||||
|
|
||||||
Webui can be found at <http://your-ip:PORT>.
|
Webui can be found at <http://your-ip:PORT>.
|
||||||
|
|
||||||
There are no addon options. All configuration files in yaml format (config and cookies) must be manually added in /config/addons_config/free_games_claimer/ according to the documentation here for config files (https://github.com/vogler/free-games-claimer#configuration--options)
|
There are no addon options. All configuration must be manually added in /config/addons_config/free_games_claimer/config.env according to the documentation here for config files (https://github.com/vogler/free-games-claimer#configuration--options)
|
||||||
|
|
||||||
If this file doesn't exist, it will be created at first boot.
|
If this file doesn't exist, it will be created at first boot.
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,8 @@
|
|||||||
"/dev/nvme2"
|
"/dev/nvme2"
|
||||||
],
|
],
|
||||||
"options": {
|
"options": {
|
||||||
"CONFIG_LOCATION": "/config/addons_config/free_games_claimer/config.yaml"
|
"CMD_ARGUMENTS": "node epic-games; node prime-gaming; node gog",
|
||||||
|
"CONFIG_LOCATION": "/config/addons_config/free_games_claimer/config.env"
|
||||||
},
|
},
|
||||||
"image": "ghcr.io/alexbelgium/free_games_claimer-{arch}",
|
"image": "ghcr.io/alexbelgium/free_games_claimer-{arch}",
|
||||||
"init": false,
|
"init": false,
|
||||||
@@ -71,10 +72,11 @@
|
|||||||
"6080/tcp": "NOVNC port"
|
"6080/tcp": "NOVNC port"
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
|
"CMD_ARGUMENTS": "str",
|
||||||
"CONFIG_LOCATION": "str"
|
"CONFIG_LOCATION": "str"
|
||||||
},
|
},
|
||||||
"slug": "free_games_claimer",
|
"slug": "free_games_claimer",
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
"version": "1.4",
|
"version": "1.4-test",
|
||||||
"webui": "[PROTO:ssl]://[HOST]:[PORT:6080]"
|
"webui": "[PROTO:ssl]://[HOST]:[PORT:6080]"
|
||||||
}
|
}
|
||||||
@@ -5,18 +5,25 @@
|
|||||||
# Initialize #
|
# Initialize #
|
||||||
##############
|
##############
|
||||||
|
|
||||||
|
# Delete file if existing
|
||||||
|
if [ -f /data/data/config.env ]; then
|
||||||
|
rm /data/data/config.env
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use new config file
|
||||||
HOME="$(bashio::config "CONFIG_LOCATION")"
|
HOME="$(bashio::config "CONFIG_LOCATION")"
|
||||||
HOME="$(dirname "$HOME")"
|
HOME="$(dirname "$HOME")"
|
||||||
if [ ! -f "$HOME"/config.yaml ]; then
|
if [ ! -f "$HOME"/config.env ]; then
|
||||||
# Copy default config.yaml
|
# Copy default config.env
|
||||||
cp /templates/config.yaml "$HOME"/config.yaml
|
cp /templates/config.env "$HOME"/config.env
|
||||||
chmod 777 "$HOME"/config.yaml
|
chmod 777 "$HOME"/config.env
|
||||||
bashio::log.warning "A default config.yaml 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"
|
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"
|
||||||
sleep 5
|
sleep 5
|
||||||
bashio::exit.nok
|
bashio::exit.nok
|
||||||
else
|
else
|
||||||
bashio::log.warning "The config.yaml 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"
|
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
|
fi
|
||||||
|
cp "$HOME"/config.env /data/data/
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
chmod -R 777 "$HOME"
|
chmod -R 777 "$HOME"
|
||||||
@@ -27,6 +34,11 @@ chmod -R 777 "$HOME"
|
|||||||
|
|
||||||
cd /data || true
|
cd /data || true
|
||||||
|
|
||||||
|
CMD_ARGUMENTS="$(bashio::config "CMD_ARGUMENTS")"
|
||||||
|
|
||||||
echo " "
|
echo " "
|
||||||
bashio::log.info "Starting the app"
|
bashio::log.info "Starting the app with arguments $CMD_ARGUMENTS"
|
||||||
echo " "
|
echo " "
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
$CMD_ARGUMENTS || {node epic-games; node prime-gaming; node gog;}
|
||||||
|
|||||||
3
free_games_claimer/rootfs/templates/config.env
Normal file
3
free_games_claimer/rootfs/templates/config.env
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SHOW=1
|
||||||
|
WIDTH=1280
|
||||||
|
HEIGHT=1280
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
SHOW: 1
|
|
||||||
WIDTH: 1280
|
|
||||||
HEIGHT: 1280
|
|
||||||
Reference in New Issue
Block a user