Files
hassio-addons/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh
2022-12-20 08:46:36 +00:00

29 lines
682 B
Bash
Executable File

#!/usr/bin/env bashio
# shellcheck shell=bash
##############
# Initialize #
##############
HOME="/config/addons_config/epicgamesfree"
if [ ! -f "$HOME"/config.json ]; then
# Copy default config.json
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
# Permissions
chmod -R 777 "$HOME"
##############
# Launch App #
##############
echo " "
bashio::log.info "Starting the app"
echo " "
cd "/usr/app/config" || true