From 95a23c4b1e426927ca25a18f602cd0719566f4f9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 19 Apr 2020 20:51:18 +0200 Subject: [PATCH] cleanup upgrade --- scripts/upgrade | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6f9aad7..98ae7e6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -166,7 +166,7 @@ ynh_add_fpm_config --phpversion="7.3" ynh_print_info --message="Configuring Kimai2..." local_conf="$final_path/config/packages/local.yaml" -ynh_backup_if_checksum_is_different "$local_conf" +ynh_backup_if_checksum_is_different --file="$local_conf" sudo cp ../conf/local.yaml $local_conf ynh_replace_string --match_string="__APP__" "$app" --target_file="$local_conf" if [ $registration -eq 1 ] @@ -175,18 +175,17 @@ then else ynh_replace_string --match_string="__REGISTRATION__" --replace_string="false" --target_file="$local_conf" fi -ynh_store_file_checksum "$local_conf" +ynh_store_file_checksum --file="$local_conf" env_conf=$final_path/.env -ynh_backup_if_checksum_is_different "$env_conf" +ynh_backup_if_checksum_is_different --file="$env_conf" # Configure environement if [ "$database" = "mysql" ]; then # setup application config sudo cp ../conf/.env.mysql $env_conf db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) db_name=$(ynh_app_setting_get --app=$app --key=db_name) - db_user=$db_name - + db_user=$db_name ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf" ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$env_conf" @@ -198,7 +197,7 @@ else ynh_replace_string --match_string="__RANDOM_KEY__" --replace_string="$random_key" --target_file="$env_conf" ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$env_conf" fi -ynh_store_file_checksum "$env_conf" +ynh_store_file_checksum --file="$env_conf" #================================================= # UPGRADE KIMAI2 @@ -209,7 +208,7 @@ ynh_install_composer --phpversion="7.3" --workdir="$final_path" --install_args=" ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="require laminas/laminas-ldap" pushd "$final_path" - php7.3 bin/console kimai:update + php7.3 bin/console kimai:update -n popd #=================================================