From 12f16cbc21b70cd25fccf515c02034056c06cc39 Mon Sep 17 00:00:00 2001 From: Yalh Date: Sat, 26 Jan 2019 00:52:30 +0100 Subject: [PATCH] add change_url process --- README.md | 1 + check_process | 4 ++-- scripts/change_url | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1fc441..95c6201 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post 1. **Pleroma** require a valid **certificate** installed on the domain. Yunohost can **install Letsencrypt certificate** on the domain from **admin web-interface** or through **command-line**. 1. This package is **multi-instance** that means you can run **multiple Pleroma instances** on a **single server**. 1. There is **No LDAP** support for Pleroma yet. +1. At the end of the installation, you will receive a mail to activate and reset your password for Pleroma. ## License diff --git a/check_process b/check_process index 9729340..3187073 100755 --- a/check_process +++ b/check_process @@ -22,9 +22,9 @@ upgrade=1 backup_restore=1 multi_instance=1 - incorrect_path=0 + incorrect_path=1 port_already_use=1 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto diff --git a/scripts/change_url b/scripts/change_url index f71fc77..d298500 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -93,6 +93,22 @@ fi # ... #================================================= +# Stop pleroma for modification +yunohost service stop $app + +ynh_replace_string "$old_domain" "$new_domain" "$final_path/$app/config/prod.secret.exs" + +# Start pleroma after modification +yunohost service start $app + +### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. +### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. +ynh_backup_if_checksum_is_different "$final_path/config.ini" +# Recalculate and store the checksum of the file for the next upgrade. +ynh_store_file_checksum "$final_path/$app/config/prod.secret.exs" + + + #================================================= # GENERIC FINALISATION #=================================================