mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Restore
This commit is contained in:
7
epicgamesfree/rootfs/etc/cont-init.d/20-folders.sh
Normal file
7
epicgamesfree/rootfs/etc/cont-init.d/20-folders.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Define home
|
||||
HOME="/config/addons_config/epicgamesfree"
|
||||
mkdir -p $HOME
|
||||
chmod -R 777 $HOME
|
||||
31
epicgamesfree/rootfs/etc/cont-init.d/99-run.sh
Normal file
31
epicgamesfree/rootfs/etc/cont-init.d/99-run.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/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 and restart the add-on"
|
||||
sleep 5
|
||||
bashio::exit.nok
|
||||
else
|
||||
bashio::log.warning "The config.json file found in $HOME will be used. Please customize according to https://github.com/claabs/epicgames-freegames-node#json-configuration and restart the add-on"
|
||||
fi
|
||||
|
||||
# Permissions
|
||||
chmod -R 777 "$HOME"
|
||||
|
||||
##############
|
||||
# Launch App #
|
||||
##############
|
||||
|
||||
echo " "
|
||||
bashio::log.info "Starting the app"
|
||||
echo " "
|
||||
|
||||
cd "/usr/app/config" || true
|
||||
Reference in New Issue
Block a user