mirror of
https://github.com/YunoHost-Apps/ntfy_ynh.git
synced 2024-09-03 19:46:27 +02:00
1fa0147e21
(cherry picked from commit 1a7fde7c120fea7872ec909141a7e7824dbff376) Signed-off-by: Alexander Wühr <awuehr@pnyhf.eu>
35 lines
No EOL
1.1 KiB
Bash
Executable file
35 lines
No EOL
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
ynh_script_progression --message="Checking version..." --weight=1
|
|
upgrade_type=$(ynh_check_app_version_changed)
|
|
|
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
then
|
|
ynh_script_progression --message="Upgrading source files..." --weight=6
|
|
ntfy_setup_source
|
|
fi
|
|
|
|
ynh_script_progression --message="Updating configuration file..." --weight=1
|
|
ynh_add_config -t "server.yml" -d "$install_dir/server.yml"
|
|
|
|
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
|
|
ynh_add_systemd_config
|
|
|
|
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
|
yunohost service add $app
|
|
|
|
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 --message="Upgrading web server configuration..." --weight=2
|
|
ynh_add_nginx_config
|
|
|
|
ynh_script_progression --message="Restarting systemd service..." --weight=1
|
|
ynh_systemd_action --action=restart
|
|
|
|
ynh_script_progression --message="Upgrade completed" --last |