From 1bebc6c2891ba4f5a2481ac4c1117492df0f8147 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Tue, 18 Jul 2023 12:56:56 +0200 Subject: [PATCH] Fix restore --- scripts/restore | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/restore b/scripts/restore index 0fea344..c20e113 100644 --- a/scripts/restore +++ b/scripts/restore @@ -31,6 +31,23 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=5 # Define and install dependencies ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +# Configure redis +redis_db=$(ynh_redis_get_free_db) +ynh_app_setting_set --app="$app" --key=redis_db --value="$redis_db" + +ynh_add_config --template="../conf/default.yml" --destination="$install_dir/.config/default.yml" + +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" +chmod 400 "$install_dir/.config/default.yml" +chown $app:$app "$install_dir/.config/default.yml" + #================================================= # REINSTALL PNPM #=================================================