1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/duniter_ynh.git synced 2024-09-03 18:26:35 +02:00

[mod] Precise progression message

Change '...' to '…'
This commit is contained in:
Moul 2022-05-02 19:22:58 +02:00 committed by M5oul
parent cd0e59c368
commit 004def4246
6 changed files with 52 additions and 52 deletions

View file

@ -23,7 +23,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info --message="Loading installation settings..." ynh_print_info --message="Loading installation settings"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -33,7 +33,7 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#================================================= #=================================================
# DECLARE DATA AND CONF FILES TO BACKUP # DECLARE DATA AND CONF FILES TO BACKUP
#================================================= #=================================================
ynh_print_info --message="Declaring files to be backed up..." ynh_print_info --message="Declaring files to be backed up"
#================================================= #=================================================
# BACKUP THE DATA DIR # BACKUP THE DATA DIR

View file

@ -24,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings"
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
@ -37,7 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." ynh_script_progression --message="Backing up the app before changing its URL (may take a while)"
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -73,14 +73,14 @@ fi
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." ynh_script_progression --message="Stopping a systemd service"
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." ynh_script_progression --message="Updating NGINX web server configuration"
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
@ -109,7 +109,7 @@ fi
#================================================= #=================================================
# SPECIFIC MODIFICATIONS # SPECIFIC MODIFICATIONS
#================================================= #=================================================
# ... #
#================================================= #=================================================
#================================================= #=================================================
@ -117,7 +117,7 @@ fi
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service"
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
@ -125,7 +125,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." ynh_script_progression --message="Reloading NGINX web server"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -33,7 +33,7 @@ architecture=$YNH_ARCH
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
ynh_script_progression --message="Validating installation parameters..." ynh_script_progression --message="Validating installation parameters"
# Register (book) web path # Register (book) web path
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
@ -41,7 +41,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_script_progression --message="Storing installation settings..." ynh_script_progression --message="Storing installation settings"
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
@ -50,7 +50,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
#================================================= #=================================================
# FIND AND OPEN A PORT # FIND AND OPEN A PORT
#================================================= #=================================================
ynh_script_progression --message="Finding an available port..." ynh_script_progression --message="Finding an available port"
# Find an available port # Find an available port
port=$(ynh_find_port --port=10901) port=$(ynh_find_port --port=10901)
@ -59,7 +59,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Configuring system user..." ynh_script_progression --message="Configuring system user"
# Create a system user # Create a system user
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
@ -67,7 +67,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring NGINX web server..." ynh_script_progression --message="Configuring NGINX web server"
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
@ -77,7 +77,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# INSTALL DUNITER # INSTALL DUNITER
#================================================= #=================================================
ynh_script_progression --message="Building Duniter.. (this will take some time and resources!)" ynh_script_progression --message="Installation of Debian package of Duniter…"
tempdir="$(mktemp -d)" tempdir="$(mktemp -d)"
@ -87,7 +87,7 @@ ynh_exec_warn_less dpkg -i $tempdir/duniter-server-v1.8.*-linux-*.deb
#================================================= #=================================================
# CREATE DATA DIRECTORY # CREATE DATA DIRECTORY
#================================================= #=================================================
ynh_script_progression --message="Creating a data directory..." ynh_script_progression --message="Creating a data directory"
datadir=/home/yunohost.app/$app datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir ynh_app_setting_set --app=$app --key=datadir --value=$datadir
@ -101,7 +101,7 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
# ADD A CONFIG FILE # ADD A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file"
duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
@ -109,7 +109,7 @@ duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domai
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Configuring a systemd service..." ynh_script_progression --message="Configuring a systemd service"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
@ -117,14 +117,14 @@ ynh_add_systemd_config
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost"
yunohost service add $app yunohost service add $app
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service"
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
@ -132,7 +132,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." ynh_script_progression --message="Configuring permissions"
# Make app public # Make app public
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"
@ -140,7 +140,7 @@ ynh_permission_update --permission="main" --add="visitors"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." ynh_script_progression --message="Reloading NGINX web server"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -29,14 +29,14 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir)
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) # 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 if ynh_exec_warn_less yunohost service status $app >/dev/null
then then
ynh_script_progression --message="Removing $app service integration..." ynh_script_progression --message="Removing $app service integration"
yunohost service remove $app yunohost service remove $app
fi fi
#================================================= #=================================================
# STOP AND REMOVE SERVICE # STOP AND REMOVE SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." ynh_script_progression --message="Stopping and removing the systemd service"
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config
@ -48,14 +48,14 @@ ynh_remove_systemd_config
# Remove the data directory if --purge option is used # Remove the data directory if --purge option is used
if [ "${YNH_APP_PURGE:-0}" -eq 1 ] if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
then then
ynh_script_progression --message="Removing app data directory..." ynh_script_progression --message="Removing app data directory"
ynh_secure_remove --file="$datadir" ynh_secure_remove --file="$datadir"
fi fi
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." ynh_script_progression --message="Removing NGINX web server configuration"
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
@ -63,7 +63,7 @@ ynh_remove_nginx_config
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Removing dependencies..." ynh_script_progression --message="Removing dependencies"
dpkg -r duniter dpkg -r duniter
@ -72,7 +72,7 @@ dpkg -r duniter
#================================================= #=================================================
# REMOVE DEDICATED USER # REMOVE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Removing the dedicated system user..." ynh_script_progression --message="Removing the dedicated system user"
# Delete a system user # Delete a system user
ynh_system_user_delete --username=$app ynh_system_user_delete --username=$app

View file

@ -23,7 +23,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -38,14 +38,14 @@ architecture=$YNH_ARCH
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." ynh_script_progression --message="Restoring the NGINX web server configuration"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Recreating the dedicated system user..." ynh_script_progression --message="Recreating the dedicated system user"
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
@ -53,7 +53,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# RESTORE THE DATA DIRECTORY # RESTORE THE DATA DIRECTORY
#================================================= #=================================================
ynh_script_progression --message="Restoring the data directory..." ynh_script_progression --message="Restoring the data directory"
ynh_restore_file --origin_path="$datadir" --not_mandatory ynh_restore_file --origin_path="$datadir" --not_mandatory
@ -68,7 +68,7 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
# INSTALL DUNITER # INSTALL DUNITER
#================================================= #=================================================
ynh_script_progression --message="Building Duniter.. (this will take some time and resources!)" ynh_script_progression --message="Installation of Debian package of Duniter…"
tempdir="$(mktemp -d)" tempdir="$(mktemp -d)"
@ -78,7 +78,7 @@ ynh_exec_warn_less dpkg -i $tempdir/duniter-server-v1.8.*-linux-*.deb
#================================================= #=================================================
# ADD A CONFIG FILE # ADD A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file"
duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
@ -86,7 +86,7 @@ duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domai
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Restoring the systemd configuration..." ynh_script_progression --message="Restoring the systemd configuration"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
@ -94,14 +94,14 @@ systemctl enable $app.service --quiet
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost"
yunohost service add $app yunohost service add $app
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
@ -110,7 +110,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." ynh_script_progression --message="Reloading NGINX web server"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -26,14 +26,14 @@ architecture=$YNH_ARCH
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_script_progression --message="Checking version..." ynh_script_progression --message="Checking version"
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." ynh_script_progression --message="Backing up the app before upgrading (may take a while)"
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -50,14 +50,14 @@ ynh_abort_if_errors
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." ynh_script_progression --message="Stopping a systemd service"
ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility"
# Cleaning legacy permissions # Cleaning legacy permissions
if ynh_legacy_permissions_exists; then if ynh_legacy_permissions_exists; then
@ -69,7 +69,7 @@ fi
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." ynh_script_progression --message="Making sure dedicated system user exists"
# Create a dedicated user (if not existing) # Create a dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
@ -77,7 +77,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." ynh_script_progression --message="Upgrading NGINX web server configuration"
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
@ -87,7 +87,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# INSTALL DUNITER # INSTALL DUNITER
#================================================= #=================================================
ynh_script_progression --message="Building Duniter.. (this will take some time and resources!)" ynh_script_progression --message="Installation of Debian package of Duniter…"
dpkg -r duniter dpkg -r duniter
@ -99,7 +99,7 @@ ynh_exec_warn_less dpkg -i $tempdir/duniter-server-v1.8.*-linux-*.deb
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." ynh_script_progression --message="Updating a configuration file"
duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
@ -107,7 +107,7 @@ duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domai
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Upgrading systemd configuration..." ynh_script_progression --message="Upgrading systemd configuration"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
@ -115,21 +115,21 @@ ynh_add_systemd_config
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." ynh_script_progression --message="Integrating service in YunoHost"
yunohost service add $app yunohost service add $app
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." ynh_script_progression --message="Starting a systemd service"
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd ynh_systemd_action --service_name=$app --action="start" --log_path=systemd
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." ynh_script_progression --message="Reloading NGINX web server"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload