From d1156bb199af10835f4cbe43ed52d3aba8b5f3f6 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Thu, 9 Apr 2020 12:43:28 +0200 Subject: [PATCH] try to save secret key if exist on update --- scripts/install | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 59b22e7..43ce2e8 100644 --- a/scripts/install +++ b/scripts/install @@ -79,16 +79,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -#================================================= -# Change options in file config.dist.php -# and copy in local.dist.php -#================================================= - -#echo "const WWW_URI = '$path_url/';" >> $final_path/config.local.php -cp -a $final_path/config.dist.php $final_path/config.local.php -ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" -# ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php" -# ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" #================================================= # Files owned by user app @@ -135,6 +125,17 @@ ynh_script_progression --message="Reloading nginx web server..." --time --weight systemctl reload nginx +#================================================= +# Change options in file config.dist.php +# and copy in local.dist.php +#================================================= + +echo "const WWW_URI = '$path_url/';" >> $final_path/config.local.php +# cp -a $final_path/config.dist.php $final_path/config.local.php +# ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" +# ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php" +# ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" + #================================================= # END OF SCRIPT #=================================================