From 9ec6ceebd29f79c3c7c7030484a693f09d43dca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 13 Jan 2023 17:50:33 +0100 Subject: [PATCH 1/5] Update manifest.json --- manifest.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 89aafdc..899dcc3 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "akkoma", "packaging_format": 1, "description": { - "en": "A free, federated social networking server built on ActivityPub open protocol. Derivate of Pleroma.", - "fr": "Un serveur de réseautage social fédéré et gratuit basé sur le protocole ouvert ActivityPub. Derivé de Pleroma." + "en": "Federated social networking server built on ActivityPub open protocol", + "fr": "Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub" }, "version": "3.5.0~ynh3", "url": "https://akkoma.social/", @@ -61,7 +61,7 @@ "name": "registration", "type": "boolean", "ask": { - "en": "Should registration be open to users who do not have a Yunohost account on the system?", + "en": "Should registration be open to users who do not have a YunoHost account on the system?", "fr": "L'inscription doit-elle être ouverte aux utilisateurs qui n'ont pas de compte YunoHost sur le système ?" }, "default": false @@ -70,7 +70,7 @@ "name": "cache", "type": "boolean", "ask": { - "en": "Enable media-cache for your instance : downloaded media won't be downloaded twice, at the price of storage capacity.", + "en": "Enable media-cache for your instance: downloaded media won't be downloaded twice, at the price of storage capacity.", "fr": "Activer le cache média pour votre instance : les médias téléchargés le seront pas deux fois, au prix d'un plus grande utilisation de l'espace de stockage." }, "default": true From 6a1df44062275d48be551039865cb5362d895ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 13 Jan 2023 17:52:10 +0100 Subject: [PATCH 2/5] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index fa8dfb4..748f7f1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,7 +7,7 @@ location / { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://localhost:__PORT__; + proxy_pass http://127.0.0.1:__PORT__; client_max_body_size 50M; From ca43f5b0f2419f5908e0406213a407d8a214de47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 13 Jan 2023 17:52:55 +0100 Subject: [PATCH 3/5] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index b9f0fb3..c013392 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=__APP__ social network +Description=__APP__: social network After=network.target postgresql.service nginx.service [Service] From 322acba44f44f3e031702c04a0d372f51156df53 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 14 Jan 2023 11:23:35 +0100 Subject: [PATCH 4/5] Adjust setting setup operation order Cf. https://github.com/YunoHost-Apps/akkoma_ynh/pull/8#issuecomment-1381280734 --- scripts/install | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 8ba9dfd..d47ab6f 100644 --- a/scripts/install +++ b/scripts/install @@ -232,6 +232,13 @@ ynh_store_file_checksum --file="$config" chmod 400 "$config" chown $app:$app "$config" +ynh_script_progression --message="Configure admin UI to allow it to change setting..." --weight=1 +# Correct path to 'static dir' in DB +# This must be done when Akkoma 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" +# allow configuration from the admin UI +ynh_replace_string --match_string="configurable_from_database: false" --replace_string="configurable_from_database: true" --target_file="$config" + #================================================= # GENERIC FINALIZATION #================================================= @@ -276,17 +283,6 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # POST INSTALL -#================================================= - -ynh_script_progression --message="Configure admin UI to allow it to change setting..." --weight=1 -# Correct path to 'static dir' in DB -# This must be done when Akkoma 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" -# allow configuration from the admin UI -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "sed -i 's/configurable_from_database: false/configurable_from_database: true/' $config" -# restart Akkoma for the new setting to take effect -ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd - #================================================= # INSTALL BASIC FRONTENDS #================================================= From ba3cf6b0e6bb46d33d6ec95a756a5650775bf158 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 14 Jan 2023 12:09:50 +0100 Subject: [PATCH 5/5] Reordering `migrate_to_db` has to be done when Akkoma is running. --- scripts/install | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index d47ab6f..b64d5c1 100644 --- a/scripts/install +++ b/scripts/install @@ -232,11 +232,8 @@ ynh_store_file_checksum --file="$config" chmod 400 "$config" chown $app:$app "$config" -ynh_script_progression --message="Configure admin UI to allow it to change setting..." --weight=1 -# Correct path to 'static dir' in DB -# This must be done when Akkoma 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" -# allow configuration from the admin UI +ynh_script_progression --message="Configure admin UI to allow it to change setting - step 1/2" --weight=1 +# change config file to allow configuration from the admin UI ynh_replace_string --match_string="configurable_from_database: false" --replace_string="configurable_from_database: true" --target_file="$config" #================================================= @@ -283,6 +280,13 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # POST INSTALL +#================================================= + +ynh_script_progression --message="Configure admin UI to allow it to change setting - step 2/2" --weight=1 +# Correct path to 'static dir' in DB +# This must be done when Akkoma 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" + #================================================= # INSTALL BASIC FRONTENDS #=================================================