diff --git a/manifest.json b/manifest.json index 4b4528e..82b83a9 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "alex.aubin@mailoo.org" }, "requirements": { - "yunohost": ">= 3.0.0" + "yunohost": ">= 3.5.0" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index 203daa2..e5c9550 100644 --- a/scripts/install +++ b/scripts/install @@ -36,6 +36,7 @@ fi #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= +ynh_script_progression --message="Validating installation parameters..." --weight=1 # Register (book) web path ynh_webpath_register $app $domain $path_url @@ -46,6 +47,7 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app final_path $final_path @@ -53,17 +55,19 @@ ynh_app_setting_set $app final_path $final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src # For this app sources are in app subdirectory ynh_setup_source "$final_path" # Set permissions to phpsysinfo directory -sudo chown -R www-data: "$final_path" +chown -R www-data: "$final_path" #================================================= # NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Configuring nginx web server..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -71,6 +75,7 @@ ynh_add_nginx_config #================================================= # SETUP SSOWAT #================================================= +ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary or protect it if [ $is_public -eq 1 ] @@ -82,5 +87,8 @@ fi #================================================= # RELOAD NGINX #================================================= +ynh_script_progression --message="Reloading nginx web server..." --weight=1 systemctl reload nginx + +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 80f7283..9b37d5e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -11,6 +11,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get "$app" domain) @@ -19,13 +20,17 @@ final_path=$(ynh_app_setting_get "$app" final_path) #================================================= # REMOVE THE MAIN DIR OF THE APP #================================================= +ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove sources -ynh_secure_remove "$final_path" +ynh_secure_remove --file="$final_path" #================================================= # REMOVE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Removing nginx web server configuration..." --weight=1 ynh_remove_nginx_config systemctl reload nginx + +ynh_script_progression --message="Removal of $app completed" --last