This commit is contained in:
Alexandre
2023-05-24 14:39:19 +02:00
parent 20788c8875
commit 13b007263b
6 changed files with 32 additions and 18 deletions

View File

@@ -5,18 +5,25 @@
# 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="$(dirname "$HOME")"
if [ ! -f "$HOME"/config.yaml ]; then
# Copy default config.yaml
cp /templates/config.yaml "$HOME"/config.yaml
chmod 777 "$HOME"/config.yaml
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"
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"
sleep 5
bashio::exit.nok
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
cp "$HOME"/config.env /data/data/
# Permissions
chmod -R 777 "$HOME"
@@ -27,6 +34,11 @@ chmod -R 777 "$HOME"
cd /data || true
CMD_ARGUMENTS="$(bashio::config "CMD_ARGUMENTS")"
echo " "
bashio::log.info "Starting the app"
bashio::log.info "Starting the app with arguments $CMD_ARGUMENTS"
echo " "
# shellcheck disable=SC2086
$CMD_ARGUMENTS || {node epic-games; node prime-gaming; node gog;}

View File

@@ -0,0 +1,3 @@
SHOW=1
WIDTH=1280
HEIGHT=1280

View File

@@ -1,3 +0,0 @@
SHOW: 1
WIDTH: 1280
HEIGHT: 1280