From 10e8930fab915b31a276fdf69fc685e5211c7434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 1 Oct 2019 21:34:41 +0200 Subject: [PATCH] Fix args for some helpers --- scripts/change_url | 2 +- scripts/install | 6 +++--- scripts/restore | 4 ++-- scripts/upgrade | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 713ffeb..7aca383 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -19,7 +19,7 @@ ynh_script_progression --message="Loading installation settings..." # RETRIEVE ARGUMENTS old_domain=$YNH_APP_OLD_DOMAIN domain=$YNH_APP_NEW_DOMAIN -path_url=$(ynh_normalize_url_path ${YNH_APP_NEW_PATH:-'/'}) +path_url=$(ynh_normalize_url_path --path_url ${YNH_APP_NEW_PATH:-'/'}) app=$YNH_APP_INSTANCE_NAME dbpass=$(ynh_app_setting_get --app $app --key mysqlpwd) diff --git a/scripts/install b/scripts/install index e4d3df2..4e45cd0 100644 --- a/scripts/install +++ b/scripts/install @@ -18,7 +18,7 @@ ynh_script_progression --message="Validating installation parameters..." # Retrieve arguments domain=$YNH_APP_ARG_DOMAIN -path_url=$(ynh_normalize_url_path $YNH_APP_ARG_PATH) +path_url=$(ynh_normalize_url_path --path_url $YNH_APP_ARG_PATH) admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC upstream_version=$(ynh_app_upstream_version) @@ -39,7 +39,7 @@ dbpass=$(ynh_string_random) key=$(ynh_string_random) # Find available ports -port=$(ynh_find_port 6000) +port=$(ynh_find_port --port 6000) # Store Settings ynh_script_progression --message="Storing installation settings..." @@ -119,7 +119,7 @@ yunohost service add "$app" --log "/var/log/$app/gitea.log" # Configure logrotate ynh_script_progression --message="Configuring log rotation..." -ynh_use_logrotate "/var/log/$app" +ynh_use_logrotate --logfile "/var/log/$app" # Save Version ynh_app_setting_set --app $app --key upstream_version --value $(ynh_app_upstream_version) diff --git a/scripts/restore b/scripts/restore index 3c1768e..f98ab3e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -25,7 +25,7 @@ port=$(ynh_app_setting_get --app $app --key web_port) upstream_version=$(ynh_app_setting_get $app upstream_version) # Check domain/path availability with app helper -ynh_webpath_available $domain $path_url || ynh_die --message "$domain is not available as domain, please use an other domain." +ynh_webpath_available --domain $domain --path_url $path_url || ynh_die --message "$domain is not available as domain, please use an other domain." # Check user parameter ynh_user_exists "$admin" \ @@ -69,7 +69,7 @@ set_permission # Configure logrotate ynh_script_progression --message="Configuring log rotation..." -ynh_use_logrotate "/var/log/$app" +ynh_use_logrotate --logfile "/var/log/$app" # Add gitea to YunoHost's monitored services ynh_script_progression --message="Register gitea service..." diff --git a/scripts/upgrade b/scripts/upgrade index fca861e..6a2e577 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,7 @@ source ./_common.sh # Retrieve app settings ynh_script_progression --message="Loading installation settings..." domain=$(ynh_app_setting_get --app $app --key domain) -path_url=$(ynh_normalize_url_path $(ynh_app_setting_get --app $app --key path)) +path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path)) dbpass=$(ynh_app_setting_get --app $app --key mysqlpwd) admin=$(ynh_app_setting_get --app $app --key adminusername) key=$(ynh_app_setting_get --app $app --key secret_key)