1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borgwarehouse_ynh.git synced 2024-09-03 18:16:17 +02:00
This commit is contained in:
Éric Gaspar 2023-10-17 14:09:48 +02:00
parent a7484ecaac
commit 8a6af45054
3 changed files with 18 additions and 3 deletions

View file

@ -16,8 +16,6 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# This should be a symetric version of what happens in the install script
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
then
@ -29,6 +27,8 @@ ynh_remove_systemd_config
ynh_remove_nginx_config
ynh_remove_nodejs
ynh_secure_remove --file="/etc/cron.d/$app"
#=================================================

View file

@ -19,6 +19,14 @@ ynh_restore_file --origin_path="$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
@ -42,7 +50,6 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
# Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -11,6 +11,14 @@ source /usr/share/yunohost/helpers
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=5
# Install Nodejs
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
# STOP SYSTEMD SERVICE
#=================================================