diff --git a/scripts/actions/public_private b/scripts/actions/public_private index 9559106..5aa6f5d 100644 --- a/scripts/actions/public_private +++ b/scripts/actions/public_private @@ -43,7 +43,7 @@ if [ $is_public -eq 0 ]; then else public_private="public" fi -ynh_script_progression --message=--message="Moving the application to $public_private..." --time +ynh_script_progression --message=--message="Moving the application to $public_private..." --weight=1 # Make app public if necessary if [ $is_public -eq 0 ]; then @@ -53,7 +53,7 @@ else ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi -ynh_script_progression --message=--message="Reconfiguring SSOwat..." --time +ynh_script_progression --message=--message="Reconfiguring SSOwat..." --weight=1 # Regen ssowat configuration yunohost app ssowatconf @@ -63,7 +63,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message=--message="Reloading nginx web server..." --time +ynh_script_progression --message=--message="Reloading nginx web server..." --weight=1 ynh_systemd_action --action=reload --service_name=nginx @@ -71,4 +71,4 @@ ynh_systemd_action --action=reload --service_name=nginx # END OF SCRIPT #================================================= -ynh_print_info --message="Execution completed" \ No newline at end of file +ynh_script_progression --message="Execution completed" --last \ No newline at end of file diff --git a/scripts/actions/web_account b/scripts/actions/web_account index 629710d..4f6111a 100644 --- a/scripts/actions/web_account +++ b/scripts/actions/web_account @@ -43,7 +43,7 @@ if [ $use_web_account -eq 0 ]; then else web_account="Disable" fi -ynh_script_progression --message=--message="$web_account web user creation..." --time +ynh_script_progression --message=--message="$web_account web user creation..." --weight=13 echo "ApplicationSetting.last.update_attributes(password_authentication_enabled_for_web: $use_web_account, signup_enabled: $use_web_account)" | gitlab-rails console @@ -54,4 +54,4 @@ ynh_app_setting_set --app=$app --key=use_web_account --value=$use_web_account # END OF SCRIPT #================================================= -ynh_print_info --message="Execution completed" \ No newline at end of file +ynh_script_progression --message="Execution completed" --last \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index f38d75a..b205998 100644 --- a/scripts/backup +++ b/scripts/backup @@ -24,7 +24,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -37,14 +37,14 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." --time +ynh_script_progression --message="Backing up nginx web server configuration..." --weight=1 ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP GITLAB DATABASE #================================================= -ynh_script_progression --message="Backuping of Gitlab..." --time +ynh_script_progression --message="Backuping of Gitlab..." --weight=9 # Use gitlab-rake to backup gitlab-rake gitlab:backup:create > backup.log @@ -58,7 +58,7 @@ ynh_backup --src_path="/var/opt/$app/backups/last_gitlab_backup.tar" #================================================= # BACKUP CONF FILES #================================================= -ynh_script_progression --message="Backuping configuration files of Gitlab..." --time +ynh_script_progression --message="Backuping configuration files of Gitlab..." --weight=1 ynh_backup --src_path="$config_path/gitlab-secrets.json" ynh_backup --src_path="$config_path/gitlab.rb" @@ -68,4 +68,4 @@ ynh_backup --src_path="$config_path/gitlab-persistent.rb" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last +ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last diff --git a/scripts/change_url b/scripts/change_url index c16fe04..690d226 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -24,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time +ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) @@ -54,12 +54,12 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --time +ynh_script_progression --message="Updating nginx web server configuration..." --weight=1 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf if [ $change_path -eq 1 ]; then - ynh_script_progression --message="Changing path..." --time + ynh_script_progression --message="Changing path..." --weight=4 #doc in: https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab @@ -77,7 +77,7 @@ fi # Change the domain for nginx if [ $change_domain -eq 1 ]; then - ynh_script_progression --message="Changing domain..." --time + ynh_script_progression --message="Changing domain..." --weight=4 # Delete file checksum for the old conf file location ynh_delete_file_checksum --file="$nginx_conf_path" @@ -91,7 +91,7 @@ fi #================================================= # CONFIGURE GITLAB #================================================= -ynh_script_progression --message="Configure gitlab..." --time +ynh_script_progression --message="Configure gitlab..." --weight=28 ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb" @@ -127,7 +127,7 @@ fi #================================================= # WAITING GITLAB #================================================= -ynh_script_progression --message="Waiting for gitlab..." --time +ynh_script_progression --message="Waiting for gitlab..." --weight=15 # Action status to just wait the service ynh_systemd_action --action=status --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=3600 @@ -137,7 +137,7 @@ ynh_systemd_action --action=status --service_name="gitlab-runsvdir" --log_path=" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time +ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --action=reload --service_name=nginx @@ -145,4 +145,4 @@ ynh_systemd_action --action=reload --service_name=nginx # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --time --last +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index e392906..96fe7df 100644 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --time +ynh_script_progression --message="Validating installation parameters..." --weight=1 config_path=/etc/$app final_path=/opt/$app @@ -75,7 +75,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --time +ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=path_url --value=$path_url @@ -94,7 +94,7 @@ ynh_app_setting_set --app=$app --key=overwrite_nginx --value="1" #================================================= # FIND A PORT #================================================= -ynh_script_progression --message="Find internal port..." --time +ynh_script_progression --message="Find internal port..." --weight=1 # Find free ports port=$(ynh_find_port --port=8080) @@ -108,14 +108,14 @@ ynh_app_setting_set --app=$app --key=sidekiq_port --value=$portSidekiq #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --time +ynh_script_progression --message="Installing dependencies..." --weight=5 ynh_install_app_dependencies $pkg_dependencies #================================================= # PRECONFIGURE GITLAB #================================================= -ynh_script_progression --message="Preconfigure gitlab..." --time +ynh_script_progression --message="Preconfigure gitlab..." --weight=1 mkdir -p $config_path @@ -142,7 +142,7 @@ ynh_store_file_checksum --file="$config_path/gitlab.rb" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --time +ynh_script_progression --message="Setting up source files..." --weight=853 update_src_version() { source ./upgrade.d/upgrade.last.sh @@ -175,7 +175,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --time +ynh_script_progression --message="Configuring nginx web server..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config client_max_body_size @@ -185,7 +185,7 @@ ynh_add_nginx_config client_max_body_size #================================================= # ADD USER AND CONFIGURE SIGN IN SYSTEM #================================================= -ynh_script_progression --message="Creating an administrator user..." --time +ynh_script_progression --message="Creating an administrator user..." --weight=13 mailadmin=$(ynh_user_get_info --username=$admin --key=mail) rdmPass=$(ynh_string_random --length=30) @@ -200,7 +200,7 @@ ApplicationSetting.last.update_attributes(password_authentication_enabled_for_we #================================================= # RECONFIGURE TO TAKE INTO ACCOUNT CHANGES #================================================= -ynh_script_progression --message="Reconfigure gitlab..." --time +ynh_script_progression --message="Reconfigure gitlab..." --weight=13 gitlab-ctl reconfigure @@ -215,7 +215,7 @@ yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/applica #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --time +ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ]; then @@ -226,7 +226,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time +ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --action=reload --service_name=nginx @@ -234,4 +234,4 @@ ynh_systemd_action --action=reload --service_name=nginx # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --time --last +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 70579b9..353e964 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 +ynh_script_progression --message="Loading installation settings..." --weight=2 app=$YNH_APP_INSTANCE_NAME @@ -30,28 +30,28 @@ config_path=$(ynh_app_setting_get --app=$app --key=config_path) if yunohost service status "gitlab-runsvdir" >/dev/null 2>&1 then - ynh_script_progression --message="Removing $app service" --time + ynh_script_progression --message="Removing $app service" --weight=1 yunohost service remove "gitlab-runsvdir" fi #================================================= # STOP GITLAB #================================================= -ynh_script_progression --message="Stopping gitlab" --time +ynh_script_progression --message="Stopping gitlab" --weight=8 gitlab-ctl stop #================================================= # REMOVE GITLAB #================================================= -ynh_script_progression --message="Removing Gitlab" --time +ynh_script_progression --message="Removing Gitlab" --weight=4 dpkg --remove gitlab-ce #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing dependencies" --time +ynh_script_progression --message="Removing dependencies" --weight=3 # Remove metapackage and its dependencies ynh_remove_app_dependencies @@ -59,7 +59,7 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory" --time +ynh_script_progression --message="Removing app main directory" --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -68,7 +68,7 @@ ynh_secure_remove --file="$config_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration" --time +ynh_script_progression --message="Removing nginx web server configuration" --weight=1 # Remove the dedicated nginx config ynh_remove_nginx_config @@ -79,12 +79,12 @@ ynh_remove_nginx_config # These ports are no longer open but were in previous versions if yunohost firewall list | grep -q "\- $port$"; then - ynh_script_progression --message="Closing port $port" --time + ynh_script_progression --message="Closing port $port" --weight=1 ynh_exec_warn_less yunohost firewall disallow TCP $port fi if yunohost firewall list | grep -q "\- $portUnicorn$"; then - ynh_script_progression --message="Closing port $portUnicorn" --time + ynh_script_progression --message="Closing port $portUnicorn" --weight=1 ynh_exec_warn_less yunohost firewall disallow TCP $portUnicorn fi @@ -103,4 +103,4 @@ ynh_secure_remove --file="/var/log/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --time --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index 9a9cc74..75e5dc5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -23,7 +23,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --time +ynh_script_progression --message="Loading settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -38,7 +38,7 @@ architecture=$(ynh_app_setting_get --app="$app" --key=architecture) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --time +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}" @@ -56,7 +56,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --time +ynh_script_progression --message="Reinstalling dependencies..." --weight=5 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies @@ -64,7 +64,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE CONF FILES #================================================= -ynh_script_progression --message="Restoring configuration files of Gitlab..." --time +ynh_script_progression --message="Restoring configuration files of Gitlab..." --weight=1 ynh_restore_file --origin_path="$config_path/gitlab-secrets.json" ynh_restore_file --origin_path="$config_path/gitlab.rb" @@ -73,7 +73,7 @@ ynh_restore_file --origin_path="$config_path/gitlab-persistent.rb" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Reinstalling gitlab..." --time +ynh_script_progression --message="Reinstalling gitlab..." --weight=853 update_src_version() { source ../settings/scripts/upgrade.d/upgrade.last.sh @@ -109,7 +109,7 @@ fi #================================================= # RESTORE GITLAB DATABASE #================================================= -ynh_script_progression --message="Restoring Gitlab..." --time +ynh_script_progression --message="Restoring Gitlab..." --weight=55 ynh_restore_file --origin_path="/var/opt/$app/backups/last_gitlab_backup.tar" @@ -134,14 +134,14 @@ yunohost service add "gitlab-runsvdir" --log "/var/log/$app/gitlab-rails/applica #================================================= # WAITING GITLAB #================================================= -ynh_script_progression --message="Waiting for gitlab..." --time +ynh_script_progression --message="Waiting for gitlab..." --weight=14 ynh_systemd_action --action=restart --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=3600 #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time +ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --action=reload --service_name=nginx @@ -149,4 +149,4 @@ ynh_systemd_action --action=reload --service_name=nginx # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --time --last +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index f72df77..9447e1c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -142,7 +142,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10 # Backup the current version of the app ynh_backup_before_upgrade @@ -169,7 +169,7 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --time +ynh_script_progression --message="Installing dependencies..." --weight=5 ynh_install_app_dependencies $pkg_dependencies @@ -177,7 +177,7 @@ ynh_install_app_dependencies $pkg_dependencies # PRECONFIGURE GITLAB #================================================= -ynh_script_progression --message="Preconfigure gitlab..." --time +ynh_script_progression --message="Preconfigure gitlab..." --weight=1 ynh_backup_if_checksum_is_different --file="$config_path/gitlab.rb" @@ -202,7 +202,7 @@ chown admin: "$config_path/gitlab-persistent.rb" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --time +ynh_script_progression --message="Setting up source files..." --weight=690 update_src_version() { source ./upgrade.d/upgrade.last.sh @@ -239,7 +239,7 @@ fi # Overwrite the nginx configuration only if it's allowed if [ $overwrite_nginx -eq 1 ] then - ynh_script_progression --message="Configuring nginx web server..." --time + ynh_script_progression --message="Configuring nginx web server..." --weight=2 # Create a dedicated nginx config ynh_add_nginx_config client_max_body_size fi @@ -265,7 +265,7 @@ fi #================================================= # WAITING GITLAB #================================================= -ynh_script_progression --message="Waiting for gitlab..." --time +ynh_script_progression --message="Waiting for gitlab..." --weight=15 # Action status to just wait the service ynh_systemd_action --action=status --service_name="gitlab-runsvdir" --log_path="/var/log/$app/unicorn/current" --line_match="adopted" --timeout=3600 @@ -273,7 +273,7 @@ ynh_systemd_action --action=status --service_name="gitlab-runsvdir" --log_path=" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time +ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --action=reload --service_name=nginx @@ -281,4 +281,4 @@ ynh_systemd_action --action=reload --service_name=nginx # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --time --last +ynh_script_progression --message="Upgrade of $app completed"--last