1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ntfy_ynh.git synced 2024-09-03 19:46:27 +02:00

Change helper command arg format

This commit is contained in:
Alexander Wühr 2023-02-24 20:27:19 +01:00
parent 4257fb6940
commit 82572e4c00
No known key found for this signature in database
6 changed files with 35 additions and 35 deletions

View file

@ -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)"
ynh_print_info --message="Backup script completed. (YunoHost will then actually copy those files to the archive)"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
ynh_script_progression --message="Restoration completed" --last

View file

@ -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
ynh_script_progression --message="Upgrade completed" --last