From 7c63f106903f7991f1d15082292ed11c5f062937 Mon Sep 17 00:00:00 2001 From: tomich Date: Mon, 20 May 2024 13:10:18 -0300 Subject: [PATCH] quick dirty fix for download domain not being sourced from environment --- install.sh | 5 +++-- start.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 6346c15e..0060d20e 100755 --- a/install.sh +++ b/install.sh @@ -329,8 +329,9 @@ config_react(){ # applicationID: '', # ---------------------------- - sed -z -E -i "s/(dexare:.*token:\s*)('')(.*applicationID:\s*)('')/\ - \1'$DISCORD_BOT_TOKEN'\3'$DISCORD_APP_ID'/"\ + DOWNLOAD_DOMAIN=$(echo $API_HOMEPAGE|awk -F'://' '{print $2}') + sed -z -E -i "s/(dexare:.*token:\s*)('')(.*applicationID:\s*)('')(.*downloadDomain:\s*)('localhost:5029')//\ + \1'$DISCORD_BOT_TOKEN'\3'$DISCORD_APP_ID'\3'$DOWNLOAD_DOMAIN'/"\ "$craig_dir/apps/bot/config/default.js" diff --git a/start.sh b/start.sh index df5b1b7f..6231f6fd 100755 --- a/start.sh +++ b/start.sh @@ -385,9 +385,9 @@ config_react(){ # // Application ID # applicationID: '', # ---------------------------- - - sed -z -E -i "s/(dexare:.*token:\s*)('')(.*applicationID:\s*)('')/\ - \1'$DISCORD_BOT_TOKEN'\3'$DISCORD_APP_ID'/"\ + DOWNLOAD_DOMAIN=$(echo $API_HOMEPAGE|awk -F'://' '{print $2}') + sed -z -E -i "s/(dexare:.*token:\s*)('')(.*applicationID:\s*)('')(.*downloadDomain:\s*)('localhost:5029')//\ + \1'$DISCORD_BOT_TOKEN'\3'$DISCORD_APP_ID'\3'$DOWNLOAD_DOMAIN'/"\ "$craig_dir/apps/bot/config/default.js"