diff --git a/scripts/install b/scripts/install index ead521c..b80d2b1 100644 --- a/scripts/install +++ b/scripts/install @@ -19,14 +19,14 @@ ynh_app_setting_set --app=$app --key=password --value=$password #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." +ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." +ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" @@ -59,7 +59,7 @@ yunohost service add $app --description="Transfer files or images" --log="/var/l #================================================= # INSTALL APP #================================================= -ynh_script_progression --message="Installing $app..." +ynh_script_progression --message="Installing $app..." --weight=1 pushd $install_dir ynh_use_nodejs @@ -69,7 +69,7 @@ popd #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." +ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.production.js" --destination="$install_dir/config.production.js" @@ -79,7 +79,7 @@ chown $app:$app "$install_dir/config.production.js" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" @@ -88,4 +88,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index f353f93..71529a3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,15 +10,16 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service integration..." + ynh_script_progression --message="Removing $app service integration..." --weight=4 yunohost service remove $app fi @@ -40,4 +41,4 @@ ynh_secure_remove --file="/var/log/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index c0ac356..f27b88d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -15,14 +15,14 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring the app main directory..." --weight=1 ynh_restore_file --origin_path="$install_dir" @@ -32,7 +32,7 @@ chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the data directory..." +ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$data_dir" --not_mandatory @@ -75,4 +75,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 30f8e1d..2616c59 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." --weight=1 password=$(ynh_app_setting_get --app=$app --key=password) @@ -27,9 +27,9 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." +ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -37,7 +37,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." + ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" --keep="config.production.js" @@ -49,7 +49,7 @@ chown -R $app:$app "$install_dir" #================================================= # SETUP SYSTEMD #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." +ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 ynh_install_nodejs --nodejs_version=$nodejs_version @@ -69,7 +69,7 @@ ynh_add_nginx_config #================================================= # UPGRADE APP #================================================= -ynh_script_progression --message="Upgrading app..." +ynh_script_progression --message="Upgrading $app..." --weight=1 pushd "$install_dir" ynh_use_nodejs @@ -79,7 +79,7 @@ popd #================================================= # UPDATE A CONFIG FILE #================================================= -#ynh_script_progression --message="Updating a configuration file..." +#ynh_script_progression --message="Updating a configuration file..." --weight=1 #ynh_add_config --template="../conf/config.production.js" --destination="$install_dir/config.production.js" @@ -89,7 +89,7 @@ popd #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="PsiTransfer listening on" @@ -97,4 +97,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" +ynh_script_progression --message="Upgrade of $app completed" --last