diff --git a/conf/nginx.conf b/conf/nginx.conf index 2425146..7aad06c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,5 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__ { +location __PATH__/ { alias __FINALPATH__/ ; diff --git a/manifest.json b/manifest.json index cbda47f..7a8c848 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "minchat", "packaging_format": 1, "description": { - "en": "A minimalist web chat", - "fr": "Un web chat minimaliste" + "en": "Minimalist web chat", + "fr": "Web chat minimaliste" }, "version": "1.0~ynh1", "url": "https://github.com/wojtek77/chat", diff --git a/scripts/backup b/scripts/backup index 0853e2c..642ffb2 100644 --- a/scripts/backup +++ b/scripts/backup @@ -55,4 +55,4 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for MinChat. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index 6d55bbf..935fc46 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script @@ -78,7 +77,7 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-fpm..." --weight=1 +ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) @@ -114,4 +113,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of MinChat completed" --last diff --git a/scripts/remove b/scripts/remove index 0f6cec9..8d192ea 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..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -28,22 +28,14 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # Remove the service from the list of services known by Yunohost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service..." --time --weight=1 + ynh_script_progression --message="Removing MinChat service..." --weight=2 yunohost service remove $app fi -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --time --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --time --weight=1 +ynh_script_progression --message="Removing MinChat main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -51,17 +43,17 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing PHP-fpm configuration..." --time --weight=1 +ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 -# Remove the dedicated php-fpm config +# Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= @@ -69,7 +61,7 @@ ynh_remove_fpm_config #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1 +ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user ynh_system_user_delete --username=$app @@ -78,4 +70,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --time --last +ynh_script_progression --message="Removal of MinChat completed" --last diff --git a/scripts/restore b/scripts/restore index 0d57f5b..cf819f6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=2 +ynh_script_progression --message="Restoring MinChat main directory..." --weight=2 ynh_restore_file --origin_path="$final_path" @@ -79,7 +79,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload @@ -88,4 +88,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for MinChat" --last diff --git a/scripts/upgrade b/scripts/upgrade index 7a844d4..700a7e3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,7 +50,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 +ynh_script_progression --message="Backing up the app before upgrading..." --weight=5 # Backup the current version of the app ynh_backup_before_upgrade @@ -101,7 +101,7 @@ chown -R $app: $final_path #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 -# Create a dedicated PHPFPM config +# Create a dedicated PHP-FPM config ynh_add_fpm_config #================================================= @@ -114,4 +114,4 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of MinChat completed" --last