1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Merge pull request #73 from YunoHost-Apps/2022.06

2022.06
This commit is contained in:
Éric Gaspar 2022-06-14 06:53:38 +02:00 committed by GitHub
commit fc8dcbc952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 43 additions and 16 deletions

View file

@ -19,7 +19,7 @@ Friendica is a decentralised communications platform that integrates social comm
Friendica connects you effortlessly to a federated communications network of several thousand servers, with more than half a million user registrations. You can directly connect to anyone on Friendica, Mastodon, Diaspora, GnuSocial, Pleroma, or Hubzilla, regardless where each user profile is hosted.
**Shipped version:** 2022.03~ynh1
**Shipped version:** 2022.06~ynh1
**Demo:** https://dir.friendica.social/servers

View file

@ -19,7 +19,7 @@ Friendica is a decentralised communications platform that integrates social comm
Friendica connects you effortlessly to a federated communications network of several thousand servers, with more than half a million user registrations. You can directly connect to anyone on Friendica, Mastodon, Diaspora, GnuSocial, Pleroma, or Hubzilla, regardless where each user profile is hosted.
**Version incluse :** 2022.03~ynh1
**Version incluse :** 2022.06~ynh1
**Démo :** https://dir.friendica.social/servers

View file

@ -19,7 +19,7 @@
return [
'database' => [
'hostname' => 'localhost',
'username' => '__DB_NAME__',
'username' => '__DB_USER__',
'password' => '__DB_PWD__',
'database' => '__DB_NAME__',
'charset' => 'utf8mb4',
@ -38,7 +38,7 @@ return [
'register_text' => '',
],
'system' => [
'default_timezone' => 'UTC',
'default_timezone' => '__TIMEZONE__',
'language' => '__LANGUAGE__',
],
];

View file

@ -6,7 +6,7 @@
"en": "Social Communication Server",
"fr": "Serveur de Communication Social"
},
"version": "2022.03~ynh1",
"version": "2022.06~ynh1",
"url": "http://friendi.ca",
"upstream": {
"license": "AGPL-3.0-only",
@ -21,13 +21,13 @@
"name": "Anmol Sharma",
"email": ""
},
"requirements": {
"yunohost": ">= 4.3.0"
},
"previous_maintainers": {
"name": "aymhce",
"email": "aymhce@gmail.com"
},
"requirements": {
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [
"nginx",

View file

@ -5,14 +5,14 @@
#=================================================
# commit hashes
# 2022.03
version_commit="f660c3894411d5a55ad201b0da8d46715b5b5002"
addons_version_commit="c35a6d58345ef7f99534f465d8453bccdca80450"
# 2022.06
version_commit="7fe7d0c90437283bd0e83a7e571e1c032e5168ea"
addons_version_commit="7bb3595d467868170f95fe231edaecf0dd4e84a1"
# dependencies used by the app
YNH_PHP_VERSION="7.3"
extra_php_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd"
pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd"
#=================================================
# EXPERIMENTAL HELPERS

View file

@ -29,6 +29,7 @@ path_url='/'
admin=$YNH_APP_ARG_ADMIN
email=$(ynh_user_get_info --username=$admin --key=mail)
language=$YNH_APP_ARG_LANGUAGE
timezone=$(cat /etc/timezone)
app=$YNH_APP_INSTANCE_NAME
@ -54,6 +55,13 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=email --value=$email
ynh_app_setting_set --app=$app --key=language --value=$language
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=6
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -127,7 +135,7 @@ ynh_add_config --template="../conf/addon.config.php" --destination="$final_path/
ynh_script_progression --message="Configuring PHP_FPM..." --weight=4
# Create a dedicated PHP-FPM configy
ynh_add_fpm_config --package="$extra_php_dependencies"
ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# 3 - some extra folders
@ -153,7 +161,7 @@ pushd "$final_path"
ynh_exec_as "$app" bin/console config system addon ldapauth
popd
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');"
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" <<< "INSERT INTO addon (id, name, version, installed, hidden, timestamp, plugin_admin) VALUES (NULL, 'ldapauth', '', '1', '0', UNIX_TIMESTAMP(), '0');"
#=================================================
# RELOAD NGINX

View file

@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================

View file

@ -53,6 +53,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..." --weight
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
@ -90,7 +98,7 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --package="$extra_php_dependencies"
ynh_add_fpm_config
#=================================================
# RESTORE THE CRON FILE
@ -98,6 +106,8 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
ynh_script_progression --message="Restoring various files..." --weight=1
ynh_restore_file "/etc/cron.d/$app"
chown root: "/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"
#=================================================
# GENERIC FINALIZATION

View file

@ -26,6 +26,7 @@ email=$(ynh_app_setting_get --app=$app --key=email)
admin=$(ynh_app_setting_get --app=$app --key=admin)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
language=$(ynh_app_setting_get --app=$app --key=language)
timezone=$(cat /etc/timezone)
#=================================================
# CHECK VERSION
@ -171,13 +172,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=6
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies"
ynh_add_fpm_config
#=================================================
# STORE THE CONFIG FILE CHECKSUM