First version

This commit is contained in:
Alexandre
2022-07-21 14:59:22 +02:00
parent 627176f84c
commit a08d9788c5
14 changed files with 441 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
##############
# Initialize #
##############
# Copy default config.json
HOME="/config/addons_config/epicgamesfree"
if [ ! -f "$HOME"/config.json ]; then
cp /templates/config.json "$HOME"/config.json
chmod 777 "$HOME"/config.json
bashio::log.warning "A default config.json file was copied in $HOME. Please customize according to https://github.com/claabs/epicgames-freegames-node#json-configuration before restarting the addon"
bashio::exit.nok
fi
# Make symlink
if [ -f /usr/app/config/config.json ]; then rm /usr/app/config/config.json; fi
ln -s "$HOME"/config.json /usr/app/config/config.json
##############
# Launch App #
##############
echo " "
bashio::log.info "Starting the app"
echo " "
/./usr/local/bin/docker-entrypoint.sh