1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phplicensewatcher_ynh.git synced 2024-09-03 19:56:32 +02:00
phplicensewatcher_ynh/scripts/upgrade

39 lines
1.2 KiB
Text
Raw Normal View History

2019-12-30 10:19:54 +01:00
#!/bin/bash
2021-11-19 21:46:31 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
2019-12-30 10:19:54 +01:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
2024-01-13 12:13:28 +01:00
ynh_script_progression --message="Upgrading source files..." --weight=1
2019-12-30 10:19:54 +01:00
2024-01-13 12:13:28 +01:00
# Download, check integrity, uncompress and patch the source from app.src
2024-01-13 13:09:05 +01:00
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="$install_dir/config.php"
2019-12-30 10:19:54 +01:00
2024-01-13 12:13:28 +01:00
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
2019-12-30 10:19:54 +01:00
#=================================================
2024-01-13 12:13:28 +01:00
# REAPPLY SYSTEM CONFIGURATIONS
2019-12-30 10:19:54 +01:00
#=================================================
2024-01-13 12:13:28 +01:00
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
2021-11-19 21:46:31 +01:00
# Create a dedicated NGINX config
ynh_add_nginx_config
2019-12-30 10:19:54 +01:00
2021-11-19 21:46:31 +01:00
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
2019-12-30 10:19:54 +01:00
2021-11-19 21:46:31 +01:00
#=================================================
# END OF SCRIPT
#=================================================
2019-12-30 10:19:54 +01:00
2021-11-19 22:24:38 +01:00
ynh_script_progression --message="Upgrade of $app completed" --last