diff --git a/scripts/backup b/scripts/backup index 27830c3..8051775 100755 --- a/scripts/backup +++ b/scripts/backup @@ -7,4 +7,4 @@ ynh_backup -s "$install_dir" ynh_backup -s "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup -s "/etc/systemd/system/$app.service" -ynh_print_info -m "Backup script completed. (YunoHost will then actually copy those files to the archive)" \ No newline at end of file +ynh_print_info --message="Backup script completed. (YunoHost will then actually copy those files to the archive)" \ No newline at end of file diff --git a/scripts/change_url b/scripts/change_url index 06e1781..c1f169a 100755 --- a/scripts/change_url +++ b/scripts/change_url @@ -3,13 +3,13 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_script_progression -m "Updating systemd service..." -w 1 +ynh_script_progression --message="Updating systemd service..." --weight=1 ynh_add_systemd_config -ynh_script_progression -m "Updating webserver configuration..." -w 1 +ynh_script_progression --message="Updating webserver configuration..." --weight=1 ynh_change_url_nginx_config -ynh_script_progression -m "Restarting systemd service..." -w 1 +ynh_script_progression --message="Restarting systemd service..." --weight=1 ynh_systemd_action --action=restart -ynh_script_progression -m "URL change completed" -l +ynh_script_progression --message="URL change completed" --last diff --git a/scripts/install b/scripts/install index 33f4e9c..5e8e1d7 100755 --- a/scripts/install +++ b/scripts/install @@ -3,30 +3,30 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_script_progression -m "Setting up source files..." -w 6 +ynh_script_progression --message="Setting up source files..." --weight=6 ntfy_setup_source -ynh_script_progression -m "Adding configuration file..." -w 1 +ynh_script_progression --message="Adding configuration file..." --weight=1 ynh_add_config -t "server.yml" -d "$install_dir/server.yml" -ynh_script_progression -m "Configuring systemd service..." -w 1 +ynh_script_progression --message="Configuring systemd service..." --weight=1 ynh_add_systemd_config -ynh_script_progression -m "Starting systemd service..." -w 1 +ynh_script_progression --message="Starting systemd service..." --weight=1 ynh_systemd_action --action=start -ynh_script_progression -m "Integrating service in YunoHost..." -w 1 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app -ynh_script_progression -m "Adding a command wrapper..." -w 1 +ynh_script_progression --message="Adding a command wrapper..." --weight=1 ynh_add_config -t "ntfy.sh" -d "$install_dir/ntfy.sh" chown $app:$app "$install_dir/ntfy.sh" chmod u+x "$install_dir/ntfy.sh" -ynh_script_progression -m "Configuring web server..." -w 2 +ynh_script_progression --message="Configuring web server..." --weight=2 ynh_add_nginx_config -ynh_script_progression -m "Adding admin user..." -w 1 +ynh_script_progression --message="Adding admin user..." --weight=1 ynh_exec_as $app NTFY_PASSWORD="$password" $install_dir/ntfy.sh user add --role=admin $admin -ynh_script_progression -m "Installation completed" -l +ynh_script_progression --message="Installation completed" --last diff --git a/scripts/remove b/scripts/remove index 150241b..e122375 100755 --- a/scripts/remove +++ b/scripts/remove @@ -3,13 +3,13 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_script_progression -m "Removing service in YunoHost..." -w 1 +ynh_script_progression --message="Removing service in YunoHost..." --weight=1 yunohost service remove $app -ynh_script_progression -m "Removing the systemd service..." -w 1 +ynh_script_progression --message="Removing the systemd service..." --weight=1 ynh_remove_systemd_config -ynh_script_progression -m "Removing the web server configuration..." -w 2 +ynh_script_progression --message="Removing the web server configuration..." --weight=2 ynh_remove_nginx_config -ynh_script_progression -m "Removal completed" -l +ynh_script_progression --message="Removal completed" --last diff --git a/scripts/restore b/scripts/restore index 878e763..bafa93c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -3,23 +3,23 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -ynh_script_progression -m "Restoring the main directory..." -w 1 +ynh_script_progression --message="Restoring the main directory..." --weight=1 ynh_restore_file -o "$install_dir" -ynh_script_progression -m "Restoring the web server configuration..." -w 1 +ynh_script_progression --message="Restoring the web server configuration..." --weight=1 ynh_restore_file -o "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_script_progression -m "Restoring the systemd configuration..." -w 1 +ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_systemd_action --action=enable -ynh_script_progression -m "Integrating service in YunoHost..." -w 1 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app -ynh_script_progression -m "Starting a systemd service..." -w 1 +ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --action=start -ynh_script_progression -m "Reloading the web server..." -w 1 -ynh_systemd_action --service_name=nginx --action=restart +ynh_script_progression --message="Reloading the web server..." --weight=1 +ynh_systemd_action --service_name=nginx --action=reload -ynh_script_progression -m "Restoration completed" -l \ No newline at end of file +ynh_script_progression --message="Restoration completed" --last \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index c4eb87f..e970acd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -3,33 +3,33 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_script_progression -m "Checking version..." -w 1 +ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression -m "Upgrading source files..." -w 6 + ynh_script_progression --message="Upgrading source files..." --weight=6 ntfy_setup_source fi -ynh_script_progression -m "Updating configuration file..." -w 1 +ynh_script_progression --message="Updating configuration file..." --weight=1 ynh_add_config -t "server.yml" -d "$install_dir/server.yml" -ynh_script_progression -m "Upgrading systemd configuration..." -w 1 +ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 ynh_add_systemd_config -ynh_script_progression -m "Integrating service in YunoHost..." -w 1 +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app -ynh_script_progression -m "Updating simple command wrapper..." -w 1 +ynh_script_progression --message="Updating simple command wrapper..." --weight=1 ynh_add_config -t "ntfy.sh" -d "$install_dir/ntfy.sh" chown $app:$app "$install_dir/ntfy.sh" chmod u+x "$install_dir/ntfy.sh" -ynh_script_progression -m "Upgrading web server configuration..." -w 2 +ynh_script_progression --message="Upgrading web server configuration..." --weight=2 ynh_add_nginx_config -ynh_script_progression -m "Restarting systemd service..." -w 1 +ynh_script_progression --message="Restarting systemd service..." --weight=1 ynh_systemd_action --action=estart -ynh_script_progression -m "Upgrade completed" -l \ No newline at end of file +ynh_script_progression --message="Upgrade completed" --last \ No newline at end of file