mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Merge pull request #230 from YunoHost-Apps/testing
Config migrate to db
This commit is contained in:
commit
010a2fdbfc
5 changed files with 37 additions and 15 deletions
|
@ -22,7 +22,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post
|
|||
**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web
|
||||
|
||||
|
||||
**Shipped version:** 2.4.5~ynh1
|
||||
**Shipped version:** 2.4.5~ynh2
|
||||
|
||||
**Demo:** http://distsn.org/pleroma-instances.html
|
||||
|
||||
|
|
22
README_fr.md
22
README_fr.md
|
@ -5,15 +5,15 @@ It shall NOT be edited by hand.
|
|||
|
||||
# Pleroma pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/pleroma)  
|
||||
[](https://dash.yunohost.org/appci/app/pleroma)  
|
||||
[](https://install-app.yunohost.org/?app=pleroma)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d'installer Pleroma rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
> *Ce package vous permet d’installer Pleroma rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
|
||||
|
||||
## Vue d'ensemble
|
||||
## Vue d’ensemble
|
||||
|
||||
Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed.
|
||||
|
||||
|
@ -22,13 +22,13 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post
|
|||
**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web
|
||||
|
||||
|
||||
**Version incluse :** 2.4.5~ynh1
|
||||
**Version incluse :** 2.4.5~ynh2
|
||||
|
||||
**Démo :** http://distsn.org/pleroma-instances.html
|
||||
|
||||
## Captures d'écran
|
||||
## Captures d’écran
|
||||
|
||||

|
||||

|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
|
@ -69,9 +69,9 @@ You can make users **moderators**. They will then be able to **delete any post**
|
|||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : <https://pleroma.social/>
|
||||
* Documentation officielle de l'admin : <https://docs.pleroma.social/>
|
||||
* Dépôt de code officiel de l'app : <https://git.pleroma.social/pleroma/pleroma/>
|
||||
* Site officiel de l’app : <https://pleroma.social/>
|
||||
* Documentation officielle de l’admin : <https://docs.pleroma.social/>
|
||||
* Dépôt de code officiel de l’app : <https://git.pleroma.social/pleroma/pleroma/>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_pleroma>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/pleroma_ynh/issues>
|
||||
|
||||
|
@ -87,4 +87,4 @@ ou
|
|||
sudo yunohost app upgrade pleroma -u https://github.com/YunoHost-Apps/pleroma_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Federated social networking server built on open protocols",
|
||||
"fr": "Serveur de réseautage social fédéré basé sur des protocoles ouverts"
|
||||
},
|
||||
"version": "2.4.5~ynh1",
|
||||
"version": "2.4.5~ynh2",
|
||||
"url": "https://pleroma.social/",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-only",
|
||||
|
|
|
@ -209,6 +209,8 @@ popd
|
|||
cat "../conf/ldap.exs" >> "$config"
|
||||
|
||||
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
|
||||
registration_bool_value=`(($registration)) && echo "true" || echo "false"`
|
||||
ynh_replace_string --match_string="registrations_open: true" --replace_string="registrations_open: $registration_bool_value" --target_file="$config"
|
||||
|
||||
pushd $final_path/live
|
||||
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl migrate"
|
||||
|
@ -269,6 +271,14 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
|||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# POST INSTALL
|
||||
#=================================================
|
||||
|
||||
# Correct path to 'static dir' in DB
|
||||
# This must be done when Pleroma is running (i.e. after install and start)
|
||||
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -150,6 +150,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
|||
# UPGRADE TO OTP RELEASE
|
||||
#=================================================
|
||||
|
||||
config="/etc/$app/config.exs"
|
||||
if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
||||
ynh_script_progression --message="Upgrading to OTP release..." --weight=1
|
||||
|
||||
|
@ -175,7 +176,6 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
|||
|
||||
mkdir -p /etc/$app
|
||||
chown -R $app /etc/$app
|
||||
config="/etc/$app/config.exs"
|
||||
mv $final_path/live/config/prod.secret.exs $config
|
||||
ynh_replace_string --match_string="use Mix.Config" --replace_string="import Config" --target_file="$config"
|
||||
echo "config :pleroma, :instance, static_dir: \"/home/yunohost.app/$app/static\"" >> $config
|
||||
|
@ -187,11 +187,15 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
|||
fi
|
||||
|
||||
if ynh_version_gt "2.0.5~ynh1" "${previous_version}" ; then
|
||||
config="/etc/$app/config.exs"
|
||||
cat "../conf/ldap.exs" >> "$config"
|
||||
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
|
||||
fi
|
||||
|
||||
if ynh_version_gt "2.4.4~ynh2" "${previous_version}"; then
|
||||
registration_bool_value=`(($registration)) && echo "true" || echo "false"`
|
||||
ynh_replace_string --match_string='registrations_open: true' --replace_string="registrations_open: $registration_bool_value" --target_file="$config"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -285,6 +289,14 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
|||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# POST INSTALL
|
||||
#=================================================
|
||||
|
||||
# Correct path to 'static dir' in DB
|
||||
# This must be done when Pleroma is running (i.e. after install/upgrade and start)
|
||||
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue