mirror of
https://github.com/YunoHost-Apps/friendica_ynh.git
synced 2024-09-03 18:36:14 +02:00
commit
fc8dcbc952
9 changed files with 43 additions and 16 deletions
|
@ -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.
|
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
|
**Demo:** https://dir.friendica.social/servers
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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
|
**Démo :** https://dir.friendica.social/servers
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
return [
|
return [
|
||||||
'database' => [
|
'database' => [
|
||||||
'hostname' => 'localhost',
|
'hostname' => 'localhost',
|
||||||
'username' => '__DB_NAME__',
|
'username' => '__DB_USER__',
|
||||||
'password' => '__DB_PWD__',
|
'password' => '__DB_PWD__',
|
||||||
'database' => '__DB_NAME__',
|
'database' => '__DB_NAME__',
|
||||||
'charset' => 'utf8mb4',
|
'charset' => 'utf8mb4',
|
||||||
|
@ -38,7 +38,7 @@ return [
|
||||||
'register_text' => '',
|
'register_text' => '',
|
||||||
],
|
],
|
||||||
'system' => [
|
'system' => [
|
||||||
'default_timezone' => 'UTC',
|
'default_timezone' => '__TIMEZONE__',
|
||||||
'language' => '__LANGUAGE__',
|
'language' => '__LANGUAGE__',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Social Communication Server",
|
"en": "Social Communication Server",
|
||||||
"fr": "Serveur de Communication Social"
|
"fr": "Serveur de Communication Social"
|
||||||
},
|
},
|
||||||
"version": "2022.03~ynh1",
|
"version": "2022.06~ynh1",
|
||||||
"url": "http://friendi.ca",
|
"url": "http://friendi.ca",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
|
@ -21,13 +21,13 @@
|
||||||
"name": "Anmol Sharma",
|
"name": "Anmol Sharma",
|
||||||
"email": ""
|
"email": ""
|
||||||
},
|
},
|
||||||
"requirements": {
|
|
||||||
"yunohost": ">= 4.3.0"
|
|
||||||
},
|
|
||||||
"previous_maintainers": {
|
"previous_maintainers": {
|
||||||
"name": "aymhce",
|
"name": "aymhce",
|
||||||
"email": "aymhce@gmail.com"
|
"email": "aymhce@gmail.com"
|
||||||
},
|
},
|
||||||
|
"requirements": {
|
||||||
|
"yunohost": ">= 4.3.0"
|
||||||
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# commit hashes
|
# commit hashes
|
||||||
# 2022.03
|
# 2022.06
|
||||||
version_commit="f660c3894411d5a55ad201b0da8d46715b5b5002"
|
version_commit="7fe7d0c90437283bd0e83a7e571e1c032e5168ea"
|
||||||
addons_version_commit="c35a6d58345ef7f99534f465d8453bccdca80450"
|
addons_version_commit="7bb3595d467868170f95fe231edaecf0dd4e84a1"
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
YNH_PHP_VERSION="7.3"
|
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
|
# EXPERIMENTAL HELPERS
|
||||||
|
|
|
@ -29,6 +29,7 @@ path_url='/'
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
|
timezone=$(cat /etc/timezone)
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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=email --value=$email
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
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
|
# 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
|
ynh_script_progression --message="Configuring PHP_FPM..." --weight=4
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM configy
|
# 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)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
# 3 - some extra folders
|
# 3 - some extra folders
|
||||||
|
@ -153,7 +161,7 @@ pushd "$final_path"
|
||||||
ynh_exec_as "$app" bin/console config system addon ldapauth
|
ynh_exec_as "$app" bin/console config system addon ldapauth
|
||||||
popd
|
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
|
# RELOAD NGINX
|
||||||
|
|
|
@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
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)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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"
|
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
|
# 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"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
# Recreate a dedicated php-fpm config
|
# Recreate a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE CRON FILE
|
# 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_script_progression --message="Restoring various files..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file "/etc/cron.d/$app"
|
ynh_restore_file "/etc/cron.d/$app"
|
||||||
|
chown root: "/etc/cron.d/$app"
|
||||||
|
chmod 644 "/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -26,6 +26,7 @@ email=$(ynh_app_setting_get --app=$app --key=email)
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||||
|
timezone=$(cat /etc/timezone)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -171,13 +172,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_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
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
ynh_add_fpm_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
|
Loading…
Reference in a new issue