1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streams_ynh.git synced 2024-09-03 20:26:20 +02:00
This commit is contained in:
Éric Gaspar 2023-08-05 08:49:13 +02:00
parent 2d184f4a23
commit 58e65bab09
7 changed files with 5 additions and 12 deletions

View file

@ -2,8 +2,8 @@ packaging_format = 2
id = "streams" id = "streams"
name = "Streams" name = "Streams"
description.en = "An open source fediverse server" description.en = "Open source fediverse server"
description.fr = "Un serveur fediverse open source" description.fr = "Serveur fediverse open source"
version = "23.08.02~ynh5" version = "23.08.02~ynh5"

View file

@ -6,7 +6,6 @@
# PHP APP SPECIFIC # PHP APP SPECIFIC
#================================================= #=================================================
YNH_PHP_VERSION="8.2"
YNH_COMPOSER_VERSION="2.5.8" YNH_COMPOSER_VERSION="2.5.8"
#================================================= #=================================================

View file

@ -57,9 +57,8 @@ ynh_backup --src_path="/etc/cron.d/$app"
#================================================= #=================================================
# BACKUP THE DATABASE # BACKUP THE DATABASE
#================================================= #=================================================
# Backup MySQL database
ynh_print_info --message="Backup of the MySQL database..." ynh_print_info --message="Backup of the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql ynh_mysql_dump_db --database="$db_name" > db.sql
#================================================= #=================================================

View file

@ -35,13 +35,11 @@ ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
#================================================= #=================================================
# CREATE A DATABASE # CREATE A DATABASE
#================================================= #=================================================
ynh_script_progression --message="Creating a database..." --weight=2 ynh_script_progression --message="Creating a database..." --weight=2
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -73,7 +71,6 @@ ynh_add_nginx_config
#================================================= #=================================================
# COMPOSER # COMPOSER
#================================================= #=================================================
ynh_script_progression --message="Pulling in external libraries with Composer..." ynh_script_progression --message="Pulling in external libraries with Composer..."
ynh_install_composer ynh_install_composer

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config

View file

@ -23,8 +23,8 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# RESTORE THE DATABASE # RESTORE THE DATABASE
#================================================= #=================================================
ynh_script_progression --message="Restoring MySQL database..." --weight=1 ynh_script_progression --message="Restoring MySQL database..." --weight=1
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;" <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
ynh_mysql_execute_file_as_root --file="./db.sql" --database=$db_name ynh_mysql_execute_file_as_root --file="./db.sql" --database=$db_name

View file

@ -29,7 +29,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# If fpm_footprint doesn't exist, create it # If fpm_footprint doesn't exist, create it
if [ -z "$fpm_footprint" ]; then if [ -z "$fpm_footprint" ]; then
fpm_footprint=low fpm_footprint=low
@ -82,7 +81,6 @@ ynh_add_nginx_config
#================================================= #=================================================
# COMPOSER # COMPOSER
#================================================= #=================================================
ynh_script_progression --message="Pulling in external libraries with Composer..." ynh_script_progression --message="Pulling in external libraries with Composer..."
ynh_install_composer ynh_install_composer