1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tiddlywiki_ynh.git synced 2024-09-03 20:26:34 +02:00
tiddlywiki_ynh/scripts/upgrade

50 lines
1.5 KiB
Text
Raw Normal View History

2021-02-16 13:38:59 +01:00
#!/bin/bash
2021-02-16 14:17:45 +01:00
source _common.sh
2021-02-16 13:38:59 +01:00
source /usr/share/yunohost/helpers
2022-07-03 16:40:34 +02:00
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression "Stopping $app's systemd service..."
2022-07-03 16:40:34 +02:00
ynh_systemctl --service=$app --action="stop"
2022-07-03 16:40:34 +02:00
2021-02-16 13:38:59 +01:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Upgrading source files..."
2021-02-16 13:38:59 +01:00
ynh_setup_source --dest_dir="$install_dir" --full_replace
2021-05-28 11:34:56 +02:00
2022-07-03 16:40:34 +02:00
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression "Upgrading dependencies..."
2022-07-03 16:40:34 +02:00
ynh_nodejs_install
2022-07-03 16:40:34 +02:00
2021-02-16 13:38:59 +01:00
#=================================================
2023-03-12 22:29:28 +01:00
# REAPPLY SYSTEM CONFIGURATIONS
2021-02-16 13:38:59 +01:00
#=================================================
ynh_script_progression "Upgrading system configurations related to $app..."
2021-02-16 13:38:59 +01:00
ynh_config_add_nginx
2021-02-16 13:38:59 +01:00
ynh_config_add_systemd
2021-02-16 14:17:45 +01:00
2024-06-23 09:25:57 +02:00
yunohost service add $app --description="Non-linear personal web notebook" --log="/var/log/$app/$app.log"
2021-03-09 23:13:38 +01:00
2021-02-16 14:17:45 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression "Starting $app's systemd service..."
2021-02-16 14:17:45 +01:00
ynh_systemctl --service=$app --action="start" --log_path="systemd" --wait_until="Serving on"
2021-02-16 13:38:59 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Upgrade of $app completed"