1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/humhub_ynh.git synced 2024-09-03 19:26:11 +02:00

Upgrade to 1.8.1

This commit is contained in:
ericgaspar 2021-03-15 23:14:42 +01:00
parent b32cfb636a
commit 5ddebe463f
No known key found for this signature in database
GPG key ID: 574F281483054D44
8 changed files with 53 additions and 109 deletions

View file

@ -11,15 +11,15 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview ## Overview
HumHub is a feature rich and highly flexible OpenSource Social Network Kit written in PHP. HumHub is a feature rich and highly flexible OpenSource Social Network Kit written in PHP.
**Shipped version:** 1.7.2 **Shipped version:** 1.8.1
## Screenshots ## Screenshots
![](Link to a screenshot of this app.) ![](https://www.humhub.com/static/img/enterprise/app_small.png)
## Demo ## Demo
* [Official demo](Link to a demo site for this app.) * [Official demo](https://www.humhub.com/en)
## Configuration ## Configuration

View file

@ -13,15 +13,15 @@ HumHub est un logiciel libre de réseau social fait pour faciliter la communicat
Il est léger, puissant et possède une interface agréable. Avec HumHub, vous pouvez créer votre propre réseau social personnalisé. Il est léger, puissant et possède une interface agréable. Avec HumHub, vous pouvez créer votre propre réseau social personnalisé.
**Version incluse :** 1.7.2 **Version incluse :** 1.8.1
## Captures d'écran ## Captures d'écran
![](Lien vers une capture d'écran de cette application.) ![](https://www.humhub.com/static/img/enterprise/app_small.png)
## Démo ## Démo
* [Démo officielle](Lien vers un site de démonstration de cette application.) * [Démo officielle](https://www.humhub.com/en)
## Configuration ## Configuration

View file

@ -1,7 +1,9 @@
SOURCE_URL=https://www.humhub.com/download/package/humhub-1.7.2.tar.gz SOURCE_URL=https://www.humhub.com/download/package/humhub-1.8.1.tar.gz
SOURCE_SUM=e20e6f8d321a0d5c8907b00465846a4d57432fe386181ca6c73ad27a9967e83a SOURCE_SUM=2eca1561506bfa06f8e36358659a0ec0f72497547d949d2232a85dc788ad4758
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=humhub-1.7.2.tar.gz SOURCE_FILENAME=humhub-1.8.1.tar.gz
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -12,9 +12,9 @@
"name": "Nils Van Zuijlen", "name": "Nils Van Zuijlen",
"url": "https://github.com/nils-van-zuijlen" "url": "https://github.com/nils-van-zuijlen"
}, },
"version": "1.7.2~ynh1", "version": "1.8.1~ynh1",
"requirements": { "requirements": {
"yunohost": ">= 4.0.0" "yunohost": ">= 4.1.7"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
@ -27,38 +27,22 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for HumHub",
"fr": "Choisissez un nom de domaine pour HumHub"
},
"example": "example.com" "example": "example.com"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for HumHub",
"fr": "Choisissez un chemin pour HumHub"
},
"example": "/humhub", "example": "/humhub",
"default": "/humhub" "default": "/humhub"
}, },
{ {
"name": "admin", "name": "admin",
"type": "user", "type": "user",
"ask": {
"en": "Choose an admin user",
"fr": "Choisissez ladministrateur"
},
"example": "johndoe" "example": "johndoe"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public site?",
"fr": "Est-ce un site public ?"
},
"default": false "default": false
} }
] ]

View file

@ -34,7 +34,7 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
ynh_script_progression --message="Validating installation parameters..." --time --weight=1 ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/var/www/$app final_path=/var/www/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder" test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
@ -45,7 +45,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_script_progression --message="Storing installation settings..." --time --weight=1 ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
@ -56,7 +56,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
#================================================= #=================================================
# CREATE A MYSQL DATABASE # CREATE A MYSQL DATABASE
#================================================= #=================================================
ynh_script_progression --message="Creating a MySQL database..." --time --weight=1 ynh_script_progression --message="Creating a MySQL database..." --weight=1
db_name=$(ynh_sanitize_dbid --db_name=$app) db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name db_user=$db_name
@ -66,7 +66,7 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Setting up source files..." --time --weight=1 ynh_script_progression --message="Setting up source files..." --weight=1
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
@ -75,7 +75,7 @@ ynh_setup_source --dest_dir="$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring NGINX web server..." --time --weight=1 ynh_script_progression --message="Configuring NGINX web server..." --weight=4
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
@ -83,7 +83,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Configuring system user..." --time --weight=1 ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user # Create a system user
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
@ -91,7 +91,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --time --weight=1 ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config --package="$extra_php_dependencies"
@ -120,16 +120,11 @@ ynh_replace_string --match_string="defined('YII_ENV') or define('YII_ENV', 'dev'
# SETUP APPLICATION WITH CURL # SETUP APPLICATION WITH CURL
#================================================= #=================================================
### Use these lines only if the app installation needs to be finalized through
### web forms. We generally don't want to ask the final user,
### so we're going to use curl to automatically fill the fields and submit the
### forms.
# Set right permissions for curl install # Set right permissions for curl install
chown -R $app: $final_path chown -R $app: $final_path
# Set the app as temporarily public for curl call # Set the app as temporarily public for curl call
ynh_script_progression --message="Configuring SSOwat..." --time --weight=1 ynh_script_progression --message="Configuring SSOwat..." --weight=30
# Making the app public for curl # Making the app public for curl
ynh_permission_update --permission="main" --add="visitors" ynh_permission_update --permission="main" --add="visitors"
# Reload SSOwat config # Reload SSOwat config
@ -139,7 +134,7 @@ yunohost app ssowatconf
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
# Installation with curl # Installation with curl
ynh_script_progression --message="Finalizing installation..." --time --weight=1 ynh_script_progression --message="Finalizing installation..." --weight=2
admin_temp_pass=$(ynh_string_random 6) admin_temp_pass=$(ynh_string_random 6)
admin_email=$(yunohost user info "$admin" --output-as plain | ynh_get_plain_key mail) admin_email=$(yunohost user info "$admin" --output-as plain | ynh_get_plain_key mail)
@ -213,7 +208,7 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/${app}"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." --time --weight=1 ynh_script_progression --message="Configuring permissions..." --weight=35
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
@ -224,7 +219,7 @@ fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_script_progression --message="Reloading NGINX web server..." --weight=2
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -27,7 +27,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# REMOVE THE MYSQL DATABASE # REMOVE THE MYSQL DATABASE
#================================================= #=================================================
ynh_script_progression --message="Removing the MySQL database..." --time --weight=1 ynh_script_progression --message="Removing the MySQL database..." --weight=1
# Remove a database if it exists, along with the associated user # Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
@ -35,7 +35,7 @@ ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Removing dependencies..." --time --weight=1 ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_remove_app_dependencies ynh_remove_app_dependencies
@ -43,7 +43,7 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Removing app main directory..." --time --weight=1 ynh_script_progression --message="Removing app main directory..." --weight=1
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
@ -51,7 +51,7 @@ ynh_secure_remove --file="$final_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --time --weight=1 ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
@ -59,7 +59,7 @@ ynh_remove_nginx_config
#================================================= #=================================================
# REMOVE PHP-FPM CONFIGURATION # REMOVE PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --time --weight=1 ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
# Remove the dedicated PHP-FPM config # Remove the dedicated PHP-FPM config
ynh_remove_fpm_config ynh_remove_fpm_config
@ -69,7 +69,7 @@ ynh_remove_fpm_config
#================================================= #=================================================
# REMOVE VARIOUS FILES # REMOVE VARIOUS FILES
#================================================= #=================================================
ynh_script_progression --message="Removing CRON configuration..." --time --weight=1 ynh_script_progression --message="Removing CRON configuration..." --weight=2
# Remove a cron file # Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app" ynh_secure_remove --file="/etc/cron.d/$app"
@ -79,7 +79,7 @@ ynh_secure_remove --file="/etc/cron.d/$app"
#================================================= #=================================================
# REMOVE DEDICATED USER # REMOVE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Removing the dedicated system user..." --time --weight=1 ynh_script_progression --message="Removing the dedicated system user..." --weight=1
# Delete a system user # Delete a system user
ynh_system_user_delete --username=$app ynh_system_user_delete --username=$app
@ -88,4 +88,4 @@ ynh_system_user_delete --username=$app
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Removal of $app completed" --time --last ynh_script_progression --message="Removal of $app completed" --last

View file

@ -24,7 +24,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -38,7 +38,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --time --weight=1 ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \ ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}" || ynh_die --message="Path not available: ${domain}${path_url}"
@ -56,14 +56,14 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Restoring the app main directory..." --time --weight=1 ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --time --weight=1 ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
@ -92,7 +92,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1 ynh_script_progression --message="Reinstalling dependencies..." --weight=2
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
@ -100,7 +100,7 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE MYSQL DATABASE # RESTORE THE MYSQL DATABASE
#================================================= #=================================================
ynh_script_progression --message="Restoring the MySQL database..." --time --weight=1 ynh_script_progression --message="Restoring the MySQL database..." --weight=2
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
@ -117,7 +117,7 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
#================================================= #=================================================
# RELOAD NGINX AND PHP-FPM # RELOAD NGINX AND PHP-FPM
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --time --weight=1 ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -126,4 +126,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Restoration completed for $app" --time --last ynh_script_progression --message="Restoration completed for $app" --last

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -28,39 +28,12 @@ db_pwd=$(ynh_app_setting_get "$app" mysqlpwd)
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
### This helper will compare the version of the currently installed app and the version of the upstream package.
### $upgrade_type can have 2 different values
### - UPGRADE_APP if the upstream app version has changed
### - UPGRADE_PACKAGE if only the YunoHost package has changed
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#
# N.B. : the followings setting migrations snippets are provided as *EXAMPLES*
# of what you may want to do in some cases (e.g. a setting was not defined on
# some legacy installs and you therefore want to initiaze stuff during upgrade)
#
# If db_name doesn't exist, create it
#if [ -z "$db_name" ]; then
# db_name=$(ynh_sanitize_dbid --db_name=$app)
# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
#fi
# If final_path doesn't exist, create it
#if [ -z "$final_path" ]; then
# final_path=/var/www/$app
# ynh_app_setting_set --app=$app --key=final_path --value=$final_path
#fi
### If nobody installed your app before 4.1,
### then you may safely remove these lines
# Cleaning legacy permissions # Cleaning legacy permissions
if ynh_legacy_permissions_exists; then if ynh_legacy_permissions_exists; then
@ -69,20 +42,10 @@ if ynh_legacy_permissions_exists; then
ynh_app_setting_delete --app=$app --key=is_public ynh_app_setting_delete --app=$app --key=is_public
fi fi
if ! ynh_permission_exists --permission="admin"; then
# Create the required permissions
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
fi
# Create a permission if needed
if ! ynh_permission_exists --permission="api"; then
ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1 ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -104,7 +67,7 @@ ynh_secure_remove --file="/etc/cron.d/$app"
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --time --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Backup user contents # Backup user contents
mv "$final_path" "$final_path.old" mv "$final_path" "$final_path.old"
@ -126,7 +89,7 @@ fi
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1 ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
@ -134,7 +97,7 @@ ynh_add_nginx_config
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1 ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing) # Create a dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
@ -142,7 +105,7 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --time --weight=1 ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
@ -152,21 +115,21 @@ ynh_add_fpm_config
#================================================= #=================================================
# MIGRATE DATABASE # MIGRATE DATABASE
#================================================= #=================================================
ynh_script_progression --message="Migrating database..." --time --weight=1 ynh_script_progression --message="Migrating database..." --weight=1
sudo -u $app /usr/bin/php$YNH_PHP_VERSION $final_path/protected/yii migrate/up --includeModuleMigrations=1 sudo -u $app /usr/bin/php$YNH_PHP_VERSION $final_path/protected/yii migrate/up --includeModuleMigrations=1
#================================================= #=================================================
# UPDATE MODULES # UPDATE MODULES
#================================================= #=================================================
ynh_script_progression --message="Updating modules..." --time --weight=1 ynh_script_progression --message="Updating modules..." --weight=1
sudo -u $app /usr/bin/php$YNH_PHP_VERSION $final_path/protected/yii module/update-all sudo -u $app /usr/bin/php$YNH_PHP_VERSION $final_path/protected/yii module/update-all
#================================================= #=================================================
# REINSTALL CRONTAB # REINSTALL CRONTAB
#================================================= #=================================================
ynh_script_progression --message="Upgrading crontab..." --time --weight=1 ynh_script_progression --message="Upgrading crontab..." --weight=1
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/${app}" ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/${app}"
@ -188,7 +151,7 @@ chown -R $app $final_path/uploads/*
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -196,4 +159,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Upgrade of $app completed" --time --last ynh_script_progression --message="Upgrade of $app completed" --last