From 05d5511136d4415a935c0659cea89d604555f7d8 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 10 Feb 2019 15:02:38 +0100 Subject: [PATCH 01/11] Global upgrade --- check_process.default | 8 +++++++- manifest.json | 3 ++- scripts/_common.sh | 22 +++++++++++----------- scripts/backup | 13 +++++++++++++ scripts/change_url | 11 +++++++++++ scripts/install | 32 ++++++++++++++++++++------------ scripts/remove | 22 +++++++++++++++++++--- scripts/restore | 13 +++++++++++++ scripts/upgrade | 18 ++++++++++++++++++ 9 files changed, 114 insertions(+), 28 deletions(-) diff --git a/check_process.default b/check_process.default index a4acac1..cbf2d12 100644 --- a/check_process.default +++ b/check_process.default @@ -20,11 +20,12 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto @@ -41,3 +42,8 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=CommitHash + name=Name and date of the commit. + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& + diff --git a/manifest.json b/manifest.json index 96e8293..b5b0ea2 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "url": "http://example.com" }, "requirements": { - "yunohost": ">= 2.7.14" + "yunohost": ">= 3.4" }, "multi_instance": true, "services": [ @@ -64,6 +64,7 @@ }, { "name": "language", + "type": "string", "ask": { "en": "Choose the application language", "fr": "Choisissez la langue de l'application" diff --git a/scripts/_common.sh b/scripts/_common.sh index bb04a03..4a6deae 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,13 +1,13 @@ #!/bin/bash -# ============= FUTURE YUNOHOST HELPER ============= -# Delete a file checksum from the app settings -# -# $app should be defined when calling this helper -# -# usage: ynh_remove_file_checksum file -# | arg: file - The file for which the checksum will be deleted -ynh_delete_file_checksum () { - local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_' - ynh_app_setting_delete $app $checksum_setting_name -} \ No newline at end of file +#================================================= +# PERSONNAL HELPERS +#================================================= + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + +#================================================= +# FUTUR OFFICIAL HELPERS +#================================================= diff --git a/scripts/backup b/scripts/backup index 3e47cf2..e85e560 100755 --- a/scripts/backup +++ b/scripts/backup @@ -23,6 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -35,24 +36,28 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # BACKUP THE APP MAIN DIR #================================================= +ynh_print_info "Backup the app main dir" ynh_backup "$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= +ynh_print_info "Backup nginx configuration" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Backup php-fpm configuration" ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= +ynh_print_info "Backup the mysql database" ynh_mysql_dump_db "$db_name" > db.sql @@ -61,12 +66,14 @@ ynh_mysql_dump_db "$db_name" > db.sql #================================================= # BACKUP LOGROTATE #================================================= +ynh_print_info "Backup logrotate configuration" ynh_backup "/etc/logrotate.d/$app" #================================================= # BACKUP SYSTEMD #================================================= +ynh_print_info "Backup systemd configuration" ynh_backup "/etc/systemd/system/$app.service" @@ -75,3 +82,9 @@ ynh_backup "/etc/systemd/system/$app.service" #================================================= ynh_backup "/etc/cron.d/$app" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Backup script completed. Please wait for YunoHost to create the backup." diff --git a/scripts/change_url b/scripts/change_url index f71fc77..31c0ee5 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # RETRIEVE ARGUMENTS #================================================= +ynh_print_info "Retrieve arguments from the manifest" old_domain=$YNH_APP_OLD_DOMAIN old_path=$YNH_APP_OLD_PATH @@ -24,6 +25,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get $app final_path) @@ -35,6 +37,7 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= # CHECK THE SYNTAX OF THE PATHS #================================================= +ynh_print_info "Check the syntax of the paths" test -n "$old_path" || old_path="/" test -n "$new_path" || new_path="/" @@ -62,6 +65,7 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= +ynh_print_info "Modify url in nginx configuration" nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -98,5 +102,12 @@ fi #================================================= # RELOAD NGINX #================================================= +ynh_print_info "Reload nginx" systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Change of url completed" diff --git a/scripts/install b/scripts/install index 0305a12..fdb342e 100755 --- a/scripts/install +++ b/scripts/install @@ -23,6 +23,7 @@ ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +ynh_print_info "Retrieve arguments from the manifest ..." domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH @@ -62,8 +63,8 @@ ynh_webpath_register $app $domain $path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= +ynh_print_info "Store settings from manifest ..." -ynh_print_info "Starting example app installation ..." ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app admin $admin @@ -75,22 +76,23 @@ ynh_app_setting_set $app language $language #================================================= # FIND AND OPEN A PORT #================================================= +ynh_print_info "Configuring firewall ..." ### Use these lines if you have to open a port for the application ### `ynh_find_port` will find the first available port starting from the given port. ### If you're not using these lines: ### - Remove the section "CLOSE A PORT" in the remove script -ynh_print_info "Configuring firewall ..." # Find a free port port=$(ynh_find_port 8095) # Open this port -yunohost firewall allow --no-upnp TCP $port 2>&1 +ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_app_setting_set $app port $port #================================================= # INSTALL DEPENDENCIES #================================================= +ynh_print_info "Installing dependencies ..." ### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. ### Those deb packages will be installed as dependencies of this package. @@ -99,12 +101,12 @@ ynh_app_setting_set $app port $port ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -ynh_print_info "Installing dependencies ..." ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE A MYSQL DATABASE #================================================= +ynh_print_info "Creating a mysql database ..." ### Use these lines if you need a database for the application. ### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. @@ -115,7 +117,6 @@ ynh_install_app_dependencies deb1 deb2 ### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script ### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script -ynh_print_info "Initializing database ..." db_name=$(ynh_sanitize_dbid $app) ynh_app_setting_set $app db_name $db_name ynh_mysql_setup_db $db_name $db_name @@ -123,12 +124,12 @@ ynh_mysql_setup_db $db_name $db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_print_info "Setting up source files ..." ### `ynh_setup_source` is used to install an app from a zip or tar.gz file, ### downloaded from an upstream source, like a git repository. ### `ynh_setup_source` use the file conf/app.src -ynh_print_info "Setting up source files ..." ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -136,24 +137,25 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= +ynh_print_info "Configuring nginx ..." ### `ynh_add_nginx_config` will use the file conf/nginx.conf -ynh_print_info "Configuring nginx ..." # Create a dedicated nginx config ynh_add_nginx_config #================================================= # CREATE DEDICATED USER #================================================= +ynh_print_info "Configuring system user ..." # Create a system user -ynh_print_info "Configuring system user ..." ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Configuring php-fpm ..." ### `ynh_add_fpm_config` is used to set up a PHP config. ### You can remove it if your app doesn't use PHP. @@ -167,7 +169,6 @@ ynh_system_user_create $app ### - And the section "PHP-FPM CONFIGURATION" in the upgrade script # Create a dedicated php-fpm config -ynh_print_info "Configuring php-fpm ..." ynh_add_fpm_config #================================================= @@ -179,6 +180,7 @@ ynh_add_fpm_config #================================================= # SETUP SYSTEMD #================================================= +ynh_print_info "Configuring a systemd service ..." ### `ynh_systemd_config` is used to configure a systemd script for an app. ### It can be used for apps that use sysvinit (with adaptation) or systemd. @@ -192,7 +194,6 @@ ynh_add_fpm_config ### - And the section "SETUP SYSTEMD" in the upgrade script # Create a dedicated systemd config -ynh_print_info "Configuring systemd service ..." ynh_add_systemd_config #================================================= @@ -262,6 +263,7 @@ chown -R root: $final_path #================================================= # SETUP LOGROTATE #================================================= +ynh_print_info "Configuring log rotation ..." ### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. ### Use this helper only if there is effectively a log file for this app. @@ -272,7 +274,6 @@ chown -R root: $final_path ### - And the section "SETUP LOGROTATE" in the upgrade script # Use logrotate to manage application logfile(s) -ynh_print_info "Configuring log rotation ..." ynh_use_logrotate #================================================= @@ -294,6 +295,7 @@ yunohost service add $app --log "/var/log/$app/$app.log" #================================================= # SETUP SSOWAT #================================================= +ynh_script_progression --message="Configuring SSOwat ..." # Make app public if necessary if [ $is_public -eq 1 ] @@ -305,6 +307,12 @@ fi #================================================= # RELOAD NGINX #================================================= - ynh_print_info "Reloading nginx ..." + systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Installation completed" diff --git a/scripts/remove b/scripts/remove index ad8d970..3723ae5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -30,13 +31,14 @@ final_path=$(ynh_app_setting_get $app final_path) # Remove a service from the admin panel, added by `yunohost service add` if yunohost service status | grep -q $app then - echo "Remove $app service" + ynh_print_info "Remove $app service" yunohost service remove $app fi #================================================= # STOP AND REMOVE SERVICE #================================================= +ynh_print_info "Stop and remove the service" # Remove the dedicated systemd config ynh_remove_systemd_config @@ -44,6 +46,7 @@ ynh_remove_systemd_config #================================================= # REMOVE THE MYSQL DATABASE #================================================= +ynh_print_info "Remove the mysql database" # Remove a database if it exists, along with the associated user ynh_mysql_remove_db $db_user $db_name @@ -51,6 +54,7 @@ ynh_mysql_remove_db $db_user $db_name #================================================= # REMOVE DEPENDENCIES #================================================= +ynh_print_info "Remove dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies @@ -58,6 +62,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= +ynh_print_info "Remove app main directory" # Remove the app directory securely ynh_secure_remove "$final_path" @@ -65,6 +70,7 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= +ynh_print_info "Remove nginx configuration" # Remove the dedicated nginx config ynh_remove_nginx_config @@ -72,6 +78,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Remove php-fpm configuration" # Remove the dedicated php-fpm config ynh_remove_fpm_config @@ -79,6 +86,7 @@ ynh_remove_fpm_config #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= +ynh_print_info "Remove logrotate configuration" # Remove the app-specific logrotate config ynh_remove_logrotate @@ -86,11 +94,12 @@ ynh_remove_logrotate #================================================= # CLOSE A PORT #================================================= +ynh_print_info "Close ports" if yunohost firewall list | grep -q "\- $port$" then - echo "Close port $port" >&2 - yunohost firewall disallow TCP $port 2>&1 + ynh_print_info "Close port $port" + ynh_exec_warn_less yunohost firewall disallow TCP $port fi #================================================= @@ -113,6 +122,13 @@ ynh_secure_remove "/var/log/$app/" #================================================= # REMOVE DEDICATED USER #================================================= +ynh_print_info "Remove the dedicated user" # Delete a system user ynh_system_user_delete $app + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Deletion completed" diff --git a/scripts/restore b/scripts/restore index 94693be..fe46ced 100755 --- a/scripts/restore +++ b/scripts/restore @@ -23,6 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -51,12 +52,14 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= +ynh_print_info "Restore the app main directory" ynh_restore_file "$final_path" #================================================= # RECREATE THE DEDICATED USER #================================================= +ynh_print_info "Recreate the dedicated user" # Create the dedicated user (if not existing) ynh_system_user_create $app @@ -79,6 +82,7 @@ ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # REINSTALL DEPENDENCIES #================================================= +ynh_print_info "Reinstall dependencies" # Define and install dependencies ynh_install_app_dependencies deb1 deb2 @@ -86,6 +90,7 @@ ynh_install_app_dependencies deb1 deb2 #================================================= # RESTORE THE MYSQL DATABASE #================================================= +ynh_print_info "Restore the mysql database" db_pwd=$(ynh_app_setting_get $app mysqlpwd) ynh_mysql_setup_db $db_name $db_name $db_pwd @@ -94,6 +99,7 @@ ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql #================================================= # RESTORE SYSTEMD #================================================= +ynh_print_info "Restore the systemd configuration" ynh_restore_file "/etc/systemd/system/$app.service" systemctl enable $app.service @@ -121,6 +127,13 @@ ynh_restore_file "/etc/logrotate.d/$app" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= +ynh_print_info "Reload nginx and php-fpm" systemctl reload php7.0-fpm systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Restoration completed" diff --git a/scripts/upgrade b/scripts/upgrade index 6a76809..5cf7e93 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -26,6 +27,7 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= +ynh_print_info "Ensure downward compatibility" # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -51,6 +53,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= +ynh_print_info "Backup the app before upgrading" # Backup the current version of the app ynh_backup_before_upgrade @@ -73,6 +76,7 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_print_info "Download, check and unpack source" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -80,6 +84,7 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= +ynh_print_info "Reconfigure nginx" # Create a dedicated nginx config ynh_add_nginx_config @@ -87,12 +92,14 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= +ynh_print_info "Upgrade dependencies" ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE DEDICATED USER #================================================= +ynh_print_info "Create a dedicated user" # Create a dedicated user (if not existing) ynh_system_user_create $app @@ -100,6 +107,7 @@ ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Reconfigure php-fpm" # Create a dedicated php-fpm config ynh_add_fpm_config @@ -119,6 +127,7 @@ ynh_store_file_checksum "$final_path/CONFIG_FILE" #================================================= # SETUP LOGROTATE #================================================= +ynh_print_info "Reconfigure logrotate" # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append @@ -126,6 +135,7 @@ ynh_use_logrotate --non-append #================================================= # SETUP SYSTEMD #================================================= +ynh_print_info "Reconfigure systemd" # Create a dedicated systemd config ynh_add_systemd_config @@ -142,6 +152,7 @@ chown -R root: $final_path #================================================= # SETUP SSOWAT #================================================= +ynh_print_info "Reconfigure SSOwat" # Make app public if necessary if [ $is_public -eq 1 ] @@ -153,5 +164,12 @@ fi #================================================= # RELOAD NGINX #================================================= +ynh_print_info "Reload nginx" systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Upgrade completed" From 5f7d591780735475c7497741a61be3b35b4b0cf1 Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Sun, 10 Feb 2019 20:04:13 +0100 Subject: [PATCH 02/11] Update scripts/_common.sh Co-Authored-By: maniackcrudelis --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4a6deae..1e4870b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,7 +1,7 @@ #!/bin/bash #================================================= -# PERSONNAL HELPERS +# PERSONAL HELPERS #================================================= #================================================= From 32f1ebca0a279a6b7aad41aa2789a3bf5e5e037b Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Sun, 10 Feb 2019 20:04:23 +0100 Subject: [PATCH 03/11] Update scripts/_common.sh Co-Authored-By: maniackcrudelis --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1e4870b..b905339 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,5 +9,5 @@ #================================================= #================================================= -# FUTUR OFFICIAL HELPERS +# FUTURE OFFICIAL HELPERS #================================================= From 0c1bec02e4af7d5b25769bc90008a0f03b0a595d Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Sun, 10 Feb 2019 20:06:53 +0100 Subject: [PATCH 04/11] Update scripts/upgrade Co-Authored-By: maniackcrudelis --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5cf7e93..e92e62c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,7 +53,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_print_info "Backup the app before upgrading" +ynh_print_info "Backup the app before upgrading (may take a while)" # Backup the current version of the app ynh_backup_before_upgrade From a95fca5a4312d7886c7b7a3824c4e3ae1f92070c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Feb 2019 18:40:20 +0100 Subject: [PATCH 05/11] Misc wording tweaks --- scripts/backup | 16 ++++++++-------- scripts/install | 31 +++++++++++++++---------------- scripts/remove | 25 ++++++++++++------------- scripts/restore | 17 +++++++++-------- scripts/upgrade | 24 ++++++++++++------------ 5 files changed, 56 insertions(+), 57 deletions(-) diff --git a/scripts/backup b/scripts/backup index e85e560..fae9930 100755 --- a/scripts/backup +++ b/scripts/backup @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -36,28 +36,28 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_print_info "Backup the app main dir" +ynh_print_info "Backing up the main app directory..." ynh_backup "$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info "Backup nginx configuration" +ynh_print_info "Backing up nginx configuration..." ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Backup php-fpm configuration" +ynh_print_info "Backing up php-fpm configuration..." ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info "Backup the mysql database" +ynh_print_info "Backing up the mysql database..." ynh_mysql_dump_db "$db_name" > db.sql @@ -66,14 +66,14 @@ ynh_mysql_dump_db "$db_name" > db.sql #================================================= # BACKUP LOGROTATE #================================================= -ynh_print_info "Backup logrotate configuration" +ynh_print_info "Backing up logrotate configuration..." ynh_backup "/etc/logrotate.d/$app" #================================================= # BACKUP SYSTEMD #================================================= -ynh_print_info "Backup systemd configuration" +ynh_print_info "Backing up systemd configuration..." ynh_backup "/etc/systemd/system/$app.service" @@ -87,4 +87,4 @@ ynh_backup "/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_print_info "Backup script completed. Please wait for YunoHost to create the backup." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those to the archive)." diff --git a/scripts/install b/scripts/install index fdb342e..07a6dc4 100755 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,6 @@ ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -ynh_print_info "Retrieve arguments from the manifest ..." domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH @@ -47,7 +46,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_print_info "Validating arguments ..." +ynh_print_info "Validating installation parameters..." ### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". ### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" @@ -63,7 +62,7 @@ ynh_webpath_register $app $domain $path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_print_info "Store settings from manifest ..." +ynh_print_info "Storing installation settings..." ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url @@ -76,7 +75,7 @@ ynh_app_setting_set $app language $language #================================================= # FIND AND OPEN A PORT #================================================= -ynh_print_info "Configuring firewall ..." +ynh_print_info "Configuring firewall..." ### Use these lines if you have to open a port for the application ### `ynh_find_port` will find the first available port starting from the given port. @@ -92,7 +91,7 @@ ynh_app_setting_set $app port $port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_print_info "Installing dependencies ..." +ynh_print_info "Installing dependencies..." ### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. ### Those deb packages will be installed as dependencies of this package. @@ -106,7 +105,7 @@ ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE A MYSQL DATABASE #================================================= -ynh_print_info "Creating a mysql database ..." +ynh_print_info "Creating a mysql database..." ### Use these lines if you need a database for the application. ### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. @@ -124,7 +123,7 @@ ynh_mysql_setup_db $db_name $db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Setting up source files ..." +ynh_print_info "Setting up source files..." ### `ynh_setup_source` is used to install an app from a zip or tar.gz file, ### downloaded from an upstream source, like a git repository. @@ -137,7 +136,7 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info "Configuring nginx ..." +ynh_print_info "Configuring nginx..." ### `ynh_add_nginx_config` will use the file conf/nginx.conf @@ -147,7 +146,7 @@ ynh_add_nginx_config #================================================= # CREATE DEDICATED USER #================================================= -ynh_print_info "Configuring system user ..." +ynh_print_info "Configuring system user..." # Create a system user ynh_system_user_create $app @@ -155,7 +154,7 @@ ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Configuring php-fpm ..." +ynh_print_info "Configuring php-fpm..." ### `ynh_add_fpm_config` is used to set up a PHP config. ### You can remove it if your app doesn't use PHP. @@ -180,7 +179,7 @@ ynh_add_fpm_config #================================================= # SETUP SYSTEMD #================================================= -ynh_print_info "Configuring a systemd service ..." +ynh_print_info "Configuring a systemd service..." ### `ynh_systemd_config` is used to configure a systemd script for an app. ### It can be used for apps that use sysvinit (with adaptation) or systemd. @@ -209,7 +208,7 @@ ynh_add_systemd_config chown -R $app: $final_path # Set the app as temporarily public for curl call -ynh_print_info "Configuring ssowat ..." +ynh_print_info "Configuring ssowat..." ynh_app_setting_set $app skipped_uris "/" # Reload SSOwat config yunohost app ssowatconf @@ -218,7 +217,7 @@ yunohost app ssowatconf systemctl reload nginx # Installation with curl -ynh_print_info "Finalizing install ..." +ynh_print_info "Finalizing install..." ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" # Remove the public access @@ -263,7 +262,7 @@ chown -R root: $final_path #================================================= # SETUP LOGROTATE #================================================= -ynh_print_info "Configuring log rotation ..." +ynh_print_info "Configuring log rotation..." ### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. ### Use this helper only if there is effectively a log file for this app. @@ -295,7 +294,7 @@ yunohost service add $app --log "/var/log/$app/$app.log" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat ..." +ynh_script_progression --message="Configuring SSOwat..." # Make app public if necessary if [ $is_public -eq 1 ] @@ -307,7 +306,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reloading nginx ..." +ynh_print_info "Reloading nginx..." systemctl reload nginx diff --git a/scripts/remove b/scripts/remove index 3723ae5..c9191ed 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -31,14 +31,14 @@ final_path=$(ynh_app_setting_get $app final_path) # Remove a service from the admin panel, added by `yunohost service add` if yunohost service status | grep -q $app then - ynh_print_info "Remove $app service" + ynh_print_info "Removing $app service" yunohost service remove $app fi #================================================= # STOP AND REMOVE SERVICE #================================================= -ynh_print_info "Stop and remove the service" +ynh_print_info "Stopping and removing the service" # Remove the dedicated systemd config ynh_remove_systemd_config @@ -46,7 +46,7 @@ ynh_remove_systemd_config #================================================= # REMOVE THE MYSQL DATABASE #================================================= -ynh_print_info "Remove the mysql database" +ynh_print_info "Removing the mysql database" # Remove a database if it exists, along with the associated user ynh_mysql_remove_db $db_user $db_name @@ -54,7 +54,7 @@ ynh_mysql_remove_db $db_user $db_name #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_print_info "Remove dependencies" +ynh_print_info "Removing dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies @@ -62,7 +62,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_print_info "Remove app main directory" +ynh_print_info "Removing app main directory" # Remove the app directory securely ynh_secure_remove "$final_path" @@ -70,7 +70,7 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_print_info "Remove nginx configuration" +ynh_print_info "Removing nginx configuration" # Remove the dedicated nginx config ynh_remove_nginx_config @@ -78,7 +78,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Remove php-fpm configuration" +ynh_print_info "Removing php-fpm configuration" # Remove the dedicated php-fpm config ynh_remove_fpm_config @@ -86,7 +86,7 @@ ynh_remove_fpm_config #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_print_info "Remove logrotate configuration" +ynh_print_info "Removing logrotate configuration" # Remove the app-specific logrotate config ynh_remove_logrotate @@ -94,11 +94,10 @@ ynh_remove_logrotate #================================================= # CLOSE A PORT #================================================= -ynh_print_info "Close ports" if yunohost firewall list | grep -q "\- $port$" then - ynh_print_info "Close port $port" + ynh_print_info "Closing port $port" ynh_exec_warn_less yunohost firewall disallow TCP $port fi @@ -122,7 +121,7 @@ ynh_secure_remove "/var/log/$app/" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_print_info "Remove the dedicated user" +ynh_print_info "Removing the dedicated system user" # Delete a system user ynh_system_user_delete $app @@ -131,4 +130,4 @@ ynh_system_user_delete $app # END OF SCRIPT #================================================= -ynh_print_info "Deletion completed" +ynh_print_info "Removal completed" diff --git a/scripts/restore b/scripts/restore index fe46ced..9fa5c6b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading settings..." app=$YNH_APP_INSTANCE_NAME @@ -35,6 +35,7 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= +ynh_print_info "Validating restoration parameters..." ynh_webpath_available $domain $path_url \ || ynh_die "Path not available: ${domain}${path_url}" @@ -52,14 +53,14 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_print_info "Restore the app main directory" +ynh_print_info "Restore the app main directory..." ynh_restore_file "$final_path" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_print_info "Recreate the dedicated user" +ynh_print_info "Recreate the dedicated systen user..." # Create the dedicated user (if not existing) ynh_system_user_create $app @@ -82,7 +83,7 @@ ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_print_info "Reinstall dependencies" +ynh_print_info "Reinstall dependencies..." # Define and install dependencies ynh_install_app_dependencies deb1 deb2 @@ -90,7 +91,7 @@ ynh_install_app_dependencies deb1 deb2 #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_print_info "Restore the mysql database" +ynh_print_info "Restoring the mysql database..." db_pwd=$(ynh_app_setting_get $app mysqlpwd) ynh_mysql_setup_db $db_name $db_name $db_pwd @@ -99,7 +100,7 @@ ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql #================================================= # RESTORE SYSTEMD #================================================= -ynh_print_info "Restore the systemd configuration" +ynh_print_info "Restoring the systemd configuration..." ynh_restore_file "/etc/systemd/system/$app.service" systemctl enable $app.service @@ -127,7 +128,7 @@ ynh_restore_file "/etc/logrotate.d/$app" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_print_info "Reload nginx and php-fpm" +ynh_print_info "Reloading nginx and php-fpm..." systemctl reload php7.0-fpm systemctl reload nginx @@ -136,4 +137,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Restoration completed" +ynh_print_info "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index e92e62c..2d825e6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -27,7 +27,7 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_print_info "Ensure downward compatibility" +ynh_print_info "Ensuring downward compatibility..." # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -53,7 +53,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_print_info "Backup the app before upgrading (may take a while)" +ynh_print_info "Backing up the app before upgrading... (may take a while)" # Backup the current version of the app ynh_backup_before_upgrade @@ -76,7 +76,7 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Download, check and unpack source" +ynh_print_info "Downloading, checking and unpacking sources..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -84,7 +84,7 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info "Reconfigure nginx" +ynh_print_info "Upgrading nginx configuration..." # Create a dedicated nginx config ynh_add_nginx_config @@ -92,14 +92,14 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_print_info "Upgrade dependencies" +ynh_print_info "Upgrading dependencies..." ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE DEDICATED USER #================================================= -ynh_print_info "Create a dedicated user" +ynh_print_info "Making sure dedicated system user exists..." # Create a dedicated user (if not existing) ynh_system_user_create $app @@ -107,7 +107,7 @@ ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Reconfigure php-fpm" +ynh_print_info "Upgrading php-fpm configuration..." # Create a dedicated php-fpm config ynh_add_fpm_config @@ -127,7 +127,7 @@ ynh_store_file_checksum "$final_path/CONFIG_FILE" #================================================= # SETUP LOGROTATE #================================================= -ynh_print_info "Reconfigure logrotate" +ynh_print_info "Upgrading logrotate configuration..." # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append @@ -135,7 +135,7 @@ ynh_use_logrotate --non-append #================================================= # SETUP SYSTEMD #================================================= -ynh_print_info "Reconfigure systemd" +ynh_print_info "Upgrading systemd configuration..." # Create a dedicated systemd config ynh_add_systemd_config @@ -152,7 +152,7 @@ chown -R root: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_print_info "Reconfigure SSOwat" +ynh_print_info "Upgrading SSOwat configuration..." # Make app public if necessary if [ $is_public -eq 1 ] @@ -164,7 +164,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reload nginx" +ynh_print_info "Reloading nginx..." systemctl reload nginx From b188ea561a4d7e489129a618eb7f222fda0dac52 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Feb 2019 18:45:47 +0100 Subject: [PATCH 06/11] ... those files :D --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index fae9930..2779742 100755 --- a/scripts/backup +++ b/scripts/backup @@ -87,4 +87,4 @@ ynh_backup "/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." From 798ef5405294e17114776132084635ec5fefe8f8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Feb 2019 18:49:07 +0100 Subject: [PATCH 07/11] Tweaks for change_url --- scripts/change_url | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 31c0ee5..31a96d9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers #================================================= # RETRIEVE ARGUMENTS #================================================= -ynh_print_info "Retrieve arguments from the manifest" old_domain=$YNH_APP_OLD_DOMAIN old_path=$YNH_APP_OLD_PATH @@ -25,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get $app final_path) @@ -37,7 +36,6 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= # CHECK THE SYNTAX OF THE PATHS #================================================= -ynh_print_info "Check the syntax of the paths" test -n "$old_path" || old_path="/" test -n "$new_path" || new_path="/" @@ -65,7 +63,7 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_print_info "Modify url in nginx configuration" +ynh_print_info "Updating nginx configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -102,7 +100,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reload nginx" +ynh_print_info "Reloading nginx..." systemctl reload nginx From 160964c0bc3a6d71a3b8b27199e86eb35f22a9b5 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 14 Feb 2019 01:35:47 +0100 Subject: [PATCH 08/11] Ensures consistency --- scripts/change_url | 2 +- scripts/install | 2 +- scripts/remove | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 31a96d9..c0d0372 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -108,4 +108,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Change of url completed" +ynh_print_info "Change of url completed for $app" diff --git a/scripts/install b/scripts/install index 07a6dc4..e7ed757 100755 --- a/scripts/install +++ b/scripts/install @@ -314,4 +314,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Installation completed" +ynh_print_info "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index c9191ed..ee37fd5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -130,4 +130,4 @@ ynh_system_user_delete $app # END OF SCRIPT #================================================= -ynh_print_info "Removal completed" +ynh_print_info "Removal of $app completed" diff --git a/scripts/upgrade b/scripts/upgrade index 2d825e6..e3013fe 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,7 +76,7 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Downloading, checking and unpacking sources..." +ynh_print_info "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -172,4 +172,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Upgrade completed" +ynh_print_info "Upgrade of $app completed" From 002bbbdf4f9ffcf308aa7065522dfa08a2943593 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 17 Feb 2019 14:08:58 +0100 Subject: [PATCH 09/11] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e7ed757..a6f2e60 100755 --- a/scripts/install +++ b/scripts/install @@ -294,7 +294,7 @@ yunohost service add $app --log "/var/log/$app/$app.log" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_print_info "Configuring SSOwat..." # Make app public if necessary if [ $is_public -eq 1 ] From 25f0a3018ac489a107b4677b2fe6f9792b05abb4 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 17 Feb 2019 17:58:02 +0100 Subject: [PATCH 10/11] Cosmetic changes on info messages --- scripts/backup | 4 ++-- scripts/change_url | 6 +++--- scripts/install | 10 +++++----- scripts/remove | 6 +++--- scripts/restore | 10 +++++----- scripts/upgrade | 6 +++--- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/backup b/scripts/backup index 2779742..99570de 100755 --- a/scripts/backup +++ b/scripts/backup @@ -43,7 +43,7 @@ ynh_backup "$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info "Backing up nginx configuration..." +ynh_print_info "Backing up nginx web server configuration..." ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" @@ -57,7 +57,7 @@ ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info "Backing up the mysql database..." +ynh_print_info "Backing up the MySQL database..." ynh_mysql_dump_db "$db_name" > db.sql diff --git a/scripts/change_url b/scripts/change_url index c0d0372..93a67da 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -63,7 +63,7 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_print_info "Updating nginx configuration..." +ynh_print_info "Updating nginx web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -100,7 +100,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reloading nginx..." +ynh_print_info "Reloading nginx web server..." systemctl reload nginx @@ -108,4 +108,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Change of url completed for $app" +ynh_print_info "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index a6f2e60..1f0eb0d 100755 --- a/scripts/install +++ b/scripts/install @@ -105,7 +105,7 @@ ynh_install_app_dependencies deb1 deb2 #================================================= # CREATE A MYSQL DATABASE #================================================= -ynh_print_info "Creating a mysql database..." +ynh_print_info "Creating a MySQL database..." ### Use these lines if you need a database for the application. ### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. @@ -136,7 +136,7 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info "Configuring nginx..." +ynh_print_info "Configuring nginx web server..." ### `ynh_add_nginx_config` will use the file conf/nginx.conf @@ -208,7 +208,7 @@ ynh_add_systemd_config chown -R $app: $final_path # Set the app as temporarily public for curl call -ynh_print_info "Configuring ssowat..." +ynh_print_info "Configuring SSOwat..." ynh_app_setting_set $app skipped_uris "/" # Reload SSOwat config yunohost app ssowatconf @@ -217,7 +217,7 @@ yunohost app ssowatconf systemctl reload nginx # Installation with curl -ynh_print_info "Finalizing install..." +ynh_print_info "Finalizing installation..." ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" # Remove the public access @@ -306,7 +306,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reloading nginx..." +ynh_print_info "Reloading nginx web server..." systemctl reload nginx diff --git a/scripts/remove b/scripts/remove index ee37fd5..08188af 100755 --- a/scripts/remove +++ b/scripts/remove @@ -38,7 +38,7 @@ fi #================================================= # STOP AND REMOVE SERVICE #================================================= -ynh_print_info "Stopping and removing the service" +ynh_print_info "Stopping and removing the systemd service" # Remove the dedicated systemd config ynh_remove_systemd_config @@ -46,7 +46,7 @@ ynh_remove_systemd_config #================================================= # REMOVE THE MYSQL DATABASE #================================================= -ynh_print_info "Removing the mysql database" +ynh_print_info "Removing the MySQL database" # Remove a database if it exists, along with the associated user ynh_mysql_remove_db $db_user $db_name @@ -70,7 +70,7 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_print_info "Removing nginx configuration" +ynh_print_info "Removing nginx web server configuration" # Remove the dedicated nginx config ynh_remove_nginx_config diff --git a/scripts/restore b/scripts/restore index 9fa5c6b..3806c0c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -53,14 +53,14 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_print_info "Restore the app main directory..." +ynh_print_info "Restoring the app main directory..." ynh_restore_file "$final_path" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_print_info "Recreate the dedicated systen user..." +ynh_print_info "Recreating the dedicated systen user..." # Create the dedicated user (if not existing) ynh_system_user_create $app @@ -83,7 +83,7 @@ ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_print_info "Reinstall dependencies..." +ynh_print_info "Reinstalling dependencies..." # Define and install dependencies ynh_install_app_dependencies deb1 deb2 @@ -91,7 +91,7 @@ ynh_install_app_dependencies deb1 deb2 #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_print_info "Restoring the mysql database..." +ynh_print_info "Restoring the MySQL database..." db_pwd=$(ynh_app_setting_get $app mysqlpwd) ynh_mysql_setup_db $db_name $db_name $db_pwd @@ -128,7 +128,7 @@ ynh_restore_file "/etc/logrotate.d/$app" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_print_info "Reloading nginx and php-fpm..." +ynh_print_info "Reloading nginx web server and php-fpm..." systemctl reload php7.0-fpm systemctl reload nginx diff --git a/scripts/upgrade b/scripts/upgrade index e3013fe..4b4393b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,7 +53,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_print_info "Backing up the app before upgrading... (may take a while)" +ynh_print_info "Backing up the app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -84,7 +84,7 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info "Upgrading nginx configuration..." +ynh_print_info "Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config @@ -164,7 +164,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reloading nginx..." +ynh_print_info "Reloading nginx web server..." systemctl reload nginx From 66b8e5dfeeac950d677b2fed731e92271366c5bc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 17 Feb 2019 18:04:58 +0100 Subject: [PATCH 11/11] Typo --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 3806c0c..cf36588 100755 --- a/scripts/restore +++ b/scripts/restore @@ -60,7 +60,7 @@ ynh_restore_file "$final_path" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_print_info "Recreating the dedicated systen user..." +ynh_print_info "Recreating the dedicated system user..." # Create the dedicated user (if not existing) ynh_system_user_create $app