1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ifconfig-io_ynh.git synced 2024-09-03 20:36:27 +02:00

Update upgrade

This commit is contained in:
Alexandre Aubin 2024-01-06 19:53:25 +01:00 committed by GitHub
parent a21c7a7621
commit 331070d82e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,21 +1,17 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source ynh_install_go
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading go..." --weight=5
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -39,26 +35,6 @@ fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
ynh_add_nginx_config
ynh_add_systemd_config
ynh_use_logrotate --non-append
yunohost service add $app --description="IP address API" --log="/var/log/$app/$app.log"
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=5
ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION
#=================================================
# SPECIFIC UPGRADE
#=================================================
@ -74,6 +50,19 @@ pushd "$app_path"
ynh_exec_warn_less $ynh_go build -tags=jsoniter
popd
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
ynh_add_nginx_config
ynh_add_systemd_config
ynh_use_logrotate --non-append
yunohost service add $app --description="IP address API" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================