mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 04:44:05 +02:00
Restore
This commit is contained in:
16
epicgamesfree/rootfs/entrypoint.sh
Normal file
16
epicgamesfree/rootfs/entrypoint.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
echo "Starting..."
|
||||
|
||||
####################
|
||||
# Starting scripts #
|
||||
####################
|
||||
|
||||
for SCRIPTS in /etc/cont-init.d/*; do
|
||||
[ -e "$SCRIPTS" ] || continue
|
||||
echo "$SCRIPTS: executing"
|
||||
chown "$(id -u)":"$(id -g)" "$SCRIPTS"
|
||||
chmod a+x "$SCRIPTS"
|
||||
# Change shebang if no s6 supervision
|
||||
sed -i 's|/usr/bin/with-contenv bashio|/usr/bin/env bashio|g' "$SCRIPTS"
|
||||
/."$SCRIPTS" || echo "$SCRIPTS: exiting $?"
|
||||
done
|
||||
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
|
||||
62
epicgamesfree/rootfs/templates/config.json
Normal file
62
epicgamesfree/rootfs/templates/config.json
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"runOnStartup": true,
|
||||
"cronSchedule": "5 16 * * *",
|
||||
"logLevel": "info",
|
||||
"webPortalConfig": {
|
||||
"baseUrl": "https://localhost:3000"
|
||||
},
|
||||
"accounts": [
|
||||
{
|
||||
"email": "example@gmail.com",
|
||||
"password": "abc1234",
|
||||
"totp": "EMNCF83ULU3K3PXPJBSWY3DPEHPK3PXPJWY3DPEHPK3YI69R39NE"
|
||||
}
|
||||
],
|
||||
"notifiers": [
|
||||
{
|
||||
"type": "email",
|
||||
"smtpHost": "smtp.gmail.com",
|
||||
"smtpPort": 587,
|
||||
"emailSenderAddress": "hello@gmail.com",
|
||||
"emailSenderName": "Epic Games Captchas",
|
||||
"emailRecipientAddress": "hello@gmail.com",
|
||||
"secure": false,
|
||||
"auth": {
|
||||
"user": "hello@gmail.com",
|
||||
"pass": "abc123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "discord",
|
||||
"webhookUrl": "https://discord.com/api/webhooks/123456789123456789/A-abcdefghijklmn-abcdefghijklmnopqrst12345678-abcdefghijklmnop123456",
|
||||
"mentionedUsers": ["914360712086843432"],
|
||||
"mentionedRoles": ["734548250895319070"]
|
||||
},
|
||||
{
|
||||
"type": "telegram",
|
||||
"token": "644739147:AAGMPo-Jz3mKRnHRTnrPEDi7jUF1vqNOD5k",
|
||||
"chatId": "-987654321"
|
||||
},
|
||||
{
|
||||
"type": "apprise",
|
||||
"apiUrl": "http://192.168.1.2:8000",
|
||||
"urls": "mailto://user:pass@gmail.com"
|
||||
},
|
||||
{
|
||||
"type": "pushover",
|
||||
"token": "a172fyyl9gw99p2xi16tq8hnib48p2",
|
||||
"userKey": "uvgidym7l5ggpwu2r8i1oy6diaapll"
|
||||
},
|
||||
{
|
||||
"type": "gotify",
|
||||
"apiUrl": "https://gotify.net",
|
||||
"token": "SnL-wAvmfo_QT"
|
||||
},
|
||||
{
|
||||
"type": "homeassistant",
|
||||
"instance": "https://homeassistant.example.com",
|
||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
|
||||
"notifyservice": "mobile_app_smartphone_name"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user