From 63bb33d060a155037867c5f45e216a4298c7a36d Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Fri, 8 Mar 2024 21:06:14 +0100 Subject: [PATCH] hardcode api_key --- scripts/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install b/scripts/install index 1f9d445..e6021ea 100755 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,11 @@ ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" +if [ $api_key != "" ] +then + ynh_replace_string --match_string="$: apiKey = $apiKeyStorage" --replace_string='$: apiKey = $apiKeyStorage'/n'setOpenAI({apiKey : "'$api_key'"})'/n --target_file=$install_dir/src/lib/Home.svelte +fi + chown -R $app:www-data "$install_dir" #=================================================