From d9780a92079fe0034f7c86c1f3afe3e3b9e3cdfb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Jun 2021 14:53:04 +0200 Subject: [PATCH] Fix --- check_process | 6 +++--- manifest.json | 4 ++-- scripts/_common.sh | 16 ++++------------ scripts/change_url | 4 ++-- scripts/install | 2 +- scripts/remove | 9 +++++---- scripts/restore | 6 +++--- scripts/upgrade | 10 +++++----- 8 files changed, 25 insertions(+), 32 deletions(-) diff --git a/check_process b/check_process index ce9bdf6..dbfcdea 100644 --- a/check_process +++ b/check_process @@ -11,7 +11,7 @@ setup_private=0 setup_public=0 upgrade=1 - upgrade=1 from_commit=f75d58cb32c51a0981333ea88974dc3199324e65 + upgrade=1 from_commit=afdd82cbed98b66ff2bf31c30f86ea8f704154f7 backup_restore=1 multi_instance=1 change_url=1 @@ -19,6 +19,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=f75d58cb32c51a0981333ea88974dc3199324e65 - name= Previous package version + ; commit=afdd82cbed98b66ff2bf31c30f86ea8f704154f7 + name= version 4.1.0 manifest_arg=domain=DOMAIN&path=PATH&admin=USER& diff --git a/manifest.json b/manifest.json index 6611bb6..2576aab 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "wallabag2", "packaging_format": 1, "description": { - "en": "A self hostable read-it-later app", - "fr": "Une application de lecture-plus-tard auto-hébergeable" + "en": "Self hostable read-it-later app", + "fr": "Application de lecture-plus-tard auto-hébergeable" }, "version": "2.4.2~ynh2", "url": "https://www.wallabag.org", diff --git a/scripts/_common.sh b/scripts/_common.sh index c4fe893..93b407e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -13,18 +13,10 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mysql ph # PERSONAL HELPERS #================================================= -function set_permissions { - # Set permissions to app files - chown -R $app:www-data $final_path - chmod -R g=u,g-w,o-rwx $final_path - - # Restrict rights to Wallabag user only - chmod 600 $wb_conf - if [ -e $final_path/var/cache/prod/appProdProjectContainer.php ]; then - chmod 700 $final_path/var/cache/prod/appProdProjectContainer.php - fi -} - #================================================= # EXPERIMENTAL HELPERS #================================================= + +#================================================= +# FUTURE OFFICIAL HELPERS +#================================================= diff --git a/scripts/change_url b/scripts/change_url index ab2a542..f968cd2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -98,7 +98,7 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -ynh_script_progression --message="Updating wallabag configuration..." +ynh_script_progression --message="Updating wallabag configuration..." --weight=3 # Change domain name in parameters.yml ynh_replace_string --match_string="domain_name: .*" --replace_string="domain_name: https://$new_domain$new_path" --target_file=$final_path/app/config/parameters.yml @@ -120,7 +120,7 @@ ynh_secure_remove --file=$final_path/var/cache #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index a180b8d..ccdf6b4 100644 --- a/scripts/install +++ b/scripts/install @@ -96,7 +96,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CONFIGURE WALLABAG #================================================= -ynh_script_progression --message="Configuring wallabag..." --weight=35 +ynh_script_progression --message="Configuring Wallabag..." --weight=35 # Generate random DES key & password deskey=$(ynh_string_random --length=24) diff --git a/scripts/remove b/scripts/remove index 195457f..c9f814c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -42,7 +42,7 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration" +ynh_script_progression --message="Removing NGINX web server configuration" --weight=1 # Remove the dedicated nginx config ynh_remove_nginx_config @@ -50,7 +50,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing php-fpm configuration" +ynh_script_progression --message="Removing PHP-FPM configuration" --weight=3 # Remove the dedicated php-fpm config ynh_remove_fpm_config @@ -58,6 +58,7 @@ ynh_remove_fpm_config #================================================= # REMOVE FAIL2BAN CONFIGURATION #================================================= +ynh_script_progression --message="Removing Fail2ban configuration..." --weight=1 ynh_remove_fail2ban_config @@ -66,7 +67,7 @@ ynh_remove_fail2ban_config #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user" +ynh_script_progression --message="Removing the dedicated system user" --weight=1 # Delete a system user ynh_system_user_delete --username=$app diff --git a/scripts/restore b/scripts/restore index 267f2b6..22fa388 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,7 +34,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +ynh_script_progression --message="Validating restoration parameters..." --weight=1 ynh_webpath_available --domain=$domain --path_url=$path_url \ || ynh_die --message="Path not available: ${domain}${path_url}" @@ -60,7 +60,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring the app main directory..." --weight=2 ynh_restore_file --origin_path="$final_path" @@ -110,7 +110,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=3 ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 2826443..5f6ffb7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,7 +48,7 @@ ynh_abort_if_errors #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 # If db_name doesn't exist, create it if [ -z "$db_name" ]; then @@ -86,7 +86,7 @@ fi #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" @@ -112,7 +112,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=3 # Create a dedicated nginx config ynh_add_nginx_config @@ -120,7 +120,7 @@ ynh_add_nginx_config #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated php-fpm config ynh_add_fpm_config --package="$extra_php_dependencies" @@ -193,7 +193,7 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload