From 36fd80bb7acebd38ee9075fede5988e71f43bfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:39:40 +0100 Subject: [PATCH 01/22] v2 --- conf/systemd.service | 4 ++-- manifest.toml | 36 ++++++++++++++++++++++++++++++++++++ scripts/backup | 12 ++++++------ scripts/install | 36 ++++++++++++++++++------------------ scripts/remove | 12 ++++++------ scripts/restore | 30 +++++++++++++++--------------- scripts/upgrade | 30 +++++++++++++++--------------- 7 files changed, 98 insertions(+), 62 deletions(-) create mode 100644 manifest.toml diff --git a/conf/systemd.service b/conf/systemd.service index 0b31170..b4e494f 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,8 +6,8 @@ After=network.target Type=simple User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/smp-server start +WorkingDirectory=__INSTALL_DIR__/ +ExecStart=__INSTALL_DIR__/smp-server start Restart=always RestartSec=3 KillSignal=SIGINT diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..08d5d3e --- /dev/null +++ b/manifest.toml @@ -0,0 +1,36 @@ +packaging_format = 2 + +id = "simplex" +name = "SimpleX" +description.en = "Messaging platform operating without user identifiers" +description.fr = "Plate-forme de messagerie fonctionnant sans identifiants d'utilisateurs" + +version = "4.1.0~ynh1" + +maintainers = ["eric_G"] + +[upstream] +license = "AGPL-3.0" +website = "https://simplex.chat/" +code = "https://github.com/simplex-chat/simplex-chat" +cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 11.0.9" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +multi_instance = false +ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. +sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] diff --git a/scripts/backup b/scripts/backup index 2f0fd0e..74af6ee 100755 --- a/scripts/backup +++ b/scripts/backup @@ -14,21 +14,21 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -39,7 +39,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP SYSTEMD diff --git a/scripts/install b/scripts/install index f1be40c..65402b8 100755 --- a/scripts/install +++ b/scripts/install @@ -13,37 +13,37 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/usr/local/bin/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +#REMOVEME? install_dir=/usr/local/bin/$app +#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" #================================================= # STANDARD MODIFICATIONS #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Finding an available port..." --weight=1 +#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port -port=$(ynh_find_port --port=5223) -ynh_app_setting_set --app=$app --key=port --value=$port +#REMOVEME? port=$(ynh_find_port --port=5223) +#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port # Open the port ynh_script_progression --message="Configuring firewall..." --weight=1 @@ -52,30 +52,30 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" -chmod +x $final_path/smp-server +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:$app "$install_dir" +chmod +x $install_dir/smp-server #================================================= # SPECIFIC SETUP #================================================= -pushd "$final_path" +pushd "$install_dir" public_ip4="$(curl -s ip.yunohost.org)" || true ./smp-server init --no-password --ip $public_ip4 -y popd diff --git a/scripts/remove b/scripts/remove index f70a931..50c6ffa 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,11 +12,11 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # STANDARD REMOVE @@ -42,7 +42,7 @@ ynh_remove_systemd_config #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="/usr/local/bin/simplex" @@ -64,10 +64,10 @@ fi #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 4ddfdeb..f4efbdc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,51 +14,51 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { +#REMOVEME? ynh_clean_setup () { #### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir \ + || ynh_die --message="There is already a directory: $install_dir " #================================================= # STANDARD RESTORATION STEPS #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=1 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index a5cb373..f190cf9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,12 +12,12 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get --app=$app --key=port) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION @@ -28,16 +28,16 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # STANDARD UPGRADE STEPS @@ -51,10 +51,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -65,12 +65,12 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$install_dir" fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # SETUP SYSTEMD From 6d90835629b0e55f928581a277c2e436be30265d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 25 Feb 2023 17:39:44 +0000 Subject: [PATCH 02/22] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 04e4120..a2dab4e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # SimpleX for YunoHost [![Integration level](https://dash.yunohost.org/integration/simplex.svg)](https://dash.yunohost.org/appci/app/simplex) ![Working status](https://ci-apps.yunohost.org/ci/badges/simplex.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/simplex.maintain.svg) + [![Install SimpleX with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=simplex) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 631b304..abbcbbe 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # SimpleX pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/simplex.svg)](https://dash.yunohost.org/appci/app/simplex) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/simplex.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/simplex.maintain.svg) + [![Installer SimpleX avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=simplex) *[Read this readme in english.](./README.md)* From 1aa5988dc1e9c77476319aa0aa23b6de9d046c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:52:24 +0100 Subject: [PATCH 03/22] fix --- check_process | 28 --------- doc/{DISCLAIMER.md => ADMIN.md} | 0 doc/{DISCLAIMER_fr.md => ADMIN_fr.md} | 0 manifest.json | 29 --------- manifest.toml | 21 ++++--- scripts/backup | 20 ------ scripts/change_url | 91 +-------------------------- scripts/install | 49 --------------- scripts/remove | 29 --------- scripts/restore | 40 ------------ scripts/upgrade | 33 ---------- 11 files changed, 13 insertions(+), 327 deletions(-) delete mode 100644 check_process rename doc/{DISCLAIMER.md => ADMIN.md} (100%) rename doc/{DISCLAIMER_fr.md => ADMIN_fr.md} (100%) delete mode 100644 manifest.json diff --git a/check_process b/check_process deleted file mode 100644 index d813274..0000000 --- a/check_process +++ /dev/null @@ -1,28 +0,0 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - -;; Test complet - ; Manifest - domain="domain.tld" - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=0 - setup_nourl=1 - setup_private=0 - setup_public=0 - upgrade=1 - #upgrade=1 from_commit=CommitHash - backup_restore=1 - multi_instance=0 - port_already_use=0 - change_url=0 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& diff --git a/doc/DISCLAIMER.md b/doc/ADMIN.md similarity index 100% rename from doc/DISCLAIMER.md rename to doc/ADMIN.md diff --git a/doc/DISCLAIMER_fr.md b/doc/ADMIN_fr.md similarity index 100% rename from doc/DISCLAIMER_fr.md rename to doc/ADMIN_fr.md diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 69d0894..0000000 --- a/manifest.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "SimpleX", - "id": "simplex", - "packaging_format": 1, - "description": { - "en": "Messaging platform operating without user identifiers", - "fr": "Plate-forme de messagerie fonctionnant sans identifiants d'utilisateurs" - }, - "version": "4.1.0~ynh1", - "url": "https://simplex.chat/", - "upstream": { - "license": "AGPL-3.0", - "website": "https://simplex.chat/", - "code": "https://github.com/simplex-chat/simplex-chat" - }, - "license": "AGPL-3.0", - "maintainer": { - "name": "eric_G", - "email": "" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": false, - "services": [], - "arguments": { - "install": [] - } -} diff --git a/manifest.toml b/manifest.toml index 08d5d3e..ea9c298 100644 --- a/manifest.toml +++ b/manifest.toml @@ -13,24 +13,27 @@ maintainers = ["eric_G"] license = "AGPL-3.0" website = "https://simplex.chat/" code = "https://github.com/simplex-chat/simplex-chat" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. [integration] -yunohost = ">= 11.0.9" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +yunohost = ">= 11.1.11" +architectures = ["amd64"] multi_instance = false -ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. -sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = "not_relevant" +sso = "not_relevant" +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [resources] + [resources.ports] + main.default = 5223 + main.exposed = "TCP" + [resources.system_user] [resources.install_dir] + dir = "/usr/local/bin/__APP__" [resources.permissions] diff --git a/scripts/backup b/scripts/backup index 74af6ee..ac5b947 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,26 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= diff --git a/scripts/change_url b/scripts/change_url index cfea773..328a5b9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -6,62 +6,8 @@ # IMPORT GENERIC HELPERS #================================================= -source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -76,35 +22,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= +ynh_change_url_nginx_config #================================================= # GENERIC FINALISATION @@ -115,13 +33,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 65402b8..1c5f5e3 100755 --- a/scripts/install +++ b/scripts/install @@ -9,60 +9,11 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 - -#REMOVEME? install_dir=/usr/local/bin/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -#REMOVEME? ynh_script_progression --message="Finding an available port..." --weight=1 - -# Find an available port -#REMOVEME? port=$(ynh_find_port --port=5223) -#REMOVEME? ynh_app_setting_set --app=$app --key=port --value=$port - -# Open the port -ynh_script_progression --message="Configuring firewall..." --weight=1 -ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" diff --git a/scripts/remove b/scripts/remove index 50c6ffa..5c641e2 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,15 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - #================================================= # STANDARD REMOVE #================================================= @@ -49,26 +40,6 @@ ynh_secure_remove --file="/usr/local/bin/simplex" ynh_secure_remove --file="/etc/opt/simplex" -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index f4efbdc..6d34450 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,45 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -#REMOVEME? ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 - -#REMOVEME? test ! -d $install_dir \ - || ynh_die --message="There is already a directory: $install_dir " - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -56,7 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index f190cf9..256d212 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,36 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? port=$(ynh_app_setting_get --app=$app --key=port) - #================================================= # CHECK VERSION #================================================= upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -48,14 +24,6 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -68,7 +36,6 @@ then ynh_setup_source --dest_dir="$install_dir" fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" From c231d483d7c72ebe2b23fae398325af9c5cc8141 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 25 Feb 2023 17:52:33 +0000 Subject: [PATCH 04/22] Auto-update README --- README.md | 21 --------------------- README_fr.md | 21 --------------------- 2 files changed, 42 deletions(-) diff --git a/README.md b/README.md index a2dab4e..7925851 100644 --- a/README.md +++ b/README.md @@ -24,27 +24,6 @@ SimpleX - the first messaging platform operating without user identifiers of any ![Screenshot of SimpleX](./doc/screenshots/conversation.png) -## Disclaimers / important information - -### SMP server address - -You can find the fingerprint in the SimpleX Chat service in the webadmin - -Your SMP server address should look like this: - -``` -smp://YOUR_FINGERPRINT=@YOUR_IPV4_ADDRESS:5223 -``` - -For mobile clients, open Settings, find an option "SMP servers", toggle "Configure SMP Servers" to on, then enter the SMP Servers Address for all servers you want the client to use. - -[iOS app](https://apps.apple.com/us/app/simplex-chat/id1605771084) -  -[![Android app](https://github.com/simplex-chat/.github/blob/master/profile/images/google_play.svg)](https://play.google.com/store/apps/details?id=chat.simplex.app) -  -[F-Droid](https://app.simplex.chat) -  - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index abbcbbe..2e369a1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,27 +24,6 @@ SimpleX - la première plate-forme de messagerie qui n'a aucun identifiant d'uti ![Capture d’écran de SimpleX](./doc/screenshots/conversation.png) -## Avertissements / informations importantes - -### Adresse du serveur SMP - -Vous pouvez trouver l'empreinte digitale dans le service SimpleX Chat dans la webadmin. - -L'adresse de votre serveur SMP devrait ressembler à ceci : - -``` -smp://YOUR_FINGERPRINT=@YOUR_IPV4_ADDRESS:5223 -``` - -Pour les clients mobiles, ouvrez Paramètres, recherchez une option "Serveurs SMP", activez "Configurer les serveurs SMP", puis entrez l'adresse des serveurs SMP pour tous les serveurs que vous souhaitez que le client utilise. - -[iOS app](https://apps.apple.com/us/app/simplex-chat/id1605771084) -  -[![Android app](https://github.com/simplex-chat/.github/blob/master/profile/images/google_play.svg)](https://play.google.com/store/apps/details?id=chat.simplex.app) -  -[F-Droid](https://app.simplex.chat) -  - ## Documentations et ressources * Site officiel de l’app : From 22e7c554b0672138321664d31b67ad4d16e4f632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 25 Feb 2023 18:53:49 +0100 Subject: [PATCH 05/22] Create tests.toml --- tests.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests.toml diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..cbbeef1 --- /dev/null +++ b/tests.toml @@ -0,0 +1,3 @@ +test_format = 1.0 + +[default] From f7883547573ca0100712cd6d925f2843b3b56ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 18:45:21 +0100 Subject: [PATCH 06/22] fix --- doc/POST_INSTALLATION.md | 0 manifest.toml | 2 +- scripts/install | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 doc/POST_INSTALLATION.md diff --git a/doc/POST_INSTALLATION.md b/doc/POST_INSTALLATION.md new file mode 100644 index 0000000..e69de29 diff --git a/manifest.toml b/manifest.toml index ea9c298..aed0933 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,7 +15,7 @@ website = "https://simplex.chat/" code = "https://github.com/simplex-chat/simplex-chat" [integration] -yunohost = ">= 11.1.11" +yunohost = ">= 11.1.12" architectures = ["amd64"] multi_instance = false ldap = "not_relevant" diff --git a/scripts/install b/scripts/install index 1c5f5e3..e9fb989 100755 --- a/scripts/install +++ b/scripts/install @@ -17,7 +17,6 @@ ynh_script_progression --message="Setting up source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" chmod +x $install_dir/smp-server From 5000d0a2ab495515027a101fd7624dc547047ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 19:43:51 +0100 Subject: [PATCH 07/22] Update POST_INSTALLATION.md --- doc/POST_INSTALLATION.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/POST_INSTALLATION.md b/doc/POST_INSTALLATION.md index e69de29..1daa348 100644 --- a/doc/POST_INSTALLATION.md +++ b/doc/POST_INSTALLATION.md @@ -0,0 +1,13 @@ +option 1: + + after installing, you need to find your fingerprint of your server: + `sudo cat /etc/opt/simplex/fingerprint` + + now make your server address: + +`smp://[:]@[,]` + + add it to your simplex app under Settings > Network & Servers > SMP Servers > + Add server + +options 2: +maybe during the CLI install, it could spit out the fingerprint address to the terminal. then we can copy & paste it. \ No newline at end of file From aec33348a0bf818b189faaa14ec3c33fa9408db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 19:48:17 +0100 Subject: [PATCH 08/22] 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 b4e494f..0db7783 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=SimpleX: messaging Protocol Server +Description=SimpleX: Messaging Protocol Server After=network.target [Service] From e70553615312afb64b864f550ea55a08cc6a2ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 19:56:54 +0100 Subject: [PATCH 09/22] Fix --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- scripts/install | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 79f58fd..4ad6e41 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -5,7 +5,7 @@ You can find the fingerprint in the SimpleX Chat service in the webadmin Your SMP server address should look like this: ``` -smp://YOUR_FINGERPRINT=@YOUR_IPV4_ADDRESS:5223 +smp://__FINGERPRINT__=@YOUR_IPV4_ADDRESS:5223 ``` For mobile clients, open Settings, find an option "SMP servers", toggle "Configure SMP Servers" to on, then enter the SMP Servers Address for all servers you want the client to use. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index ab52f39..3b08a3f 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -5,7 +5,7 @@ Vous pouvez trouver l'empreinte digitale dans le service SimpleX Chat dans la we L'adresse de votre serveur SMP devrait ressembler à ceci : ``` -smp://YOUR_FINGERPRINT=@YOUR_IPV4_ADDRESS:5223 +smp://__FINGERPRINT__=@YOUR_IPV4_ADDRESS:5223 ``` Pour les clients mobiles, ouvrez Paramètres, recherchez une option "Serveurs SMP", activez "Configurer les serveurs SMP", puis entrez l'adresse des serveurs SMP pour tous les serveurs que vous souhaitez que le client utilise. diff --git a/scripts/install b/scripts/install index e9fb989..5ed5a28 100755 --- a/scripts/install +++ b/scripts/install @@ -29,6 +29,7 @@ pushd "$install_dir" public_ip4="$(curl -s ip.yunohost.org)" || true ./smp-server init --no-password --ip $public_ip4 -y popd +fingerprint=$( cat /etc/opt/simplex/fingerprint ) chown -R $app:$app "/etc/opt/simplex" From 209a703a0f7836e2761ec56159f1e20882bb766e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:02:02 +0100 Subject: [PATCH 10/22] fix --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- scripts/install | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 4ad6e41..5e05755 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -5,7 +5,7 @@ You can find the fingerprint in the SimpleX Chat service in the webadmin Your SMP server address should look like this: ``` -smp://__FINGERPRINT__=@YOUR_IPV4_ADDRESS:5223 +smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ ``` For mobile clients, open Settings, find an option "SMP servers", toggle "Configure SMP Servers" to on, then enter the SMP Servers Address for all servers you want the client to use. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 3b08a3f..532b2fb 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -5,7 +5,7 @@ Vous pouvez trouver l'empreinte digitale dans le service SimpleX Chat dans la we L'adresse de votre serveur SMP devrait ressembler à ceci : ``` -smp://__FINGERPRINT__=@YOUR_IPV4_ADDRESS:5223 +smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ ``` Pour les clients mobiles, ouvrez Paramètres, recherchez une option "Serveurs SMP", activez "Configurer les serveurs SMP", puis entrez l'adresse des serveurs SMP pour tous les serveurs que vous souhaitez que le client utilise. diff --git a/scripts/install b/scripts/install index 5ed5a28..4b4436a 100755 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,8 @@ pushd "$install_dir" public_ip4="$(curl -s ip.yunohost.org)" || true ./smp-server init --no-password --ip $public_ip4 -y popd -fingerprint=$( cat /etc/opt/simplex/fingerprint ) + +fingerprint=$(cat /etc/opt/simplex/fingerprint) chown -R $app:$app "/etc/opt/simplex" From 91471b64bd9cce40d7a53d30cd534bc33162870e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:14:49 +0100 Subject: [PATCH 11/22] Update POST_INSTALLATION.md --- doc/POST_INSTALLATION.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/doc/POST_INSTALLATION.md b/doc/POST_INSTALLATION.md index 1daa348..31432cc 100644 --- a/doc/POST_INSTALLATION.md +++ b/doc/POST_INSTALLATION.md @@ -1,13 +1,5 @@ -option 1: +Your SMP server address: - after installing, you need to find your fingerprint of your server: - `sudo cat /etc/opt/simplex/fingerprint` - - now make your server address: - -`smp://[:]@[,]` - - add it to your simplex app under Settings > Network & Servers > SMP Servers > + Add server - -options 2: -maybe during the CLI install, it could spit out the fingerprint address to the terminal. then we can copy & paste it. \ No newline at end of file +``` +smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ +``` From 6eb99a79c66232e460138348d77f4935ee7d78d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:16:10 +0100 Subject: [PATCH 12/22] fix --- doc/{POST_INSTALLATION.md => POST_INSTALL.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{POST_INSTALLATION.md => POST_INSTALL.md} (100%) diff --git a/doc/POST_INSTALLATION.md b/doc/POST_INSTALL.md similarity index 100% rename from doc/POST_INSTALLATION.md rename to doc/POST_INSTALL.md From a9e34fc0275e1437eabe4626ef8ec3e9f3729726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 22:45:39 +0100 Subject: [PATCH 13/22] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 4b4436a..ed36a75 100755 --- a/scripts/install +++ b/scripts/install @@ -31,6 +31,7 @@ pushd "$install_dir" popd fingerprint=$(cat /etc/opt/simplex/fingerprint) +ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint chown -R $app:$app "/etc/opt/simplex" From 8dd9ad10c9d57d8280c92010d66efe81b9d5c509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:05:12 +0100 Subject: [PATCH 14/22] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index ed36a75..19a621a 100755 --- a/scripts/install +++ b/scripts/install @@ -31,6 +31,7 @@ pushd "$install_dir" popd fingerprint=$(cat /etc/opt/simplex/fingerprint) +ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint chown -R $app:$app "/etc/opt/simplex" From 8e95035e3900b1d248ac2d2319bbcd07f1d83f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:14:15 +0100 Subject: [PATCH 15/22] fix --- doc/ADMIN.md | 4 +--- doc/ADMIN_fr.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 5e05755..5461e50 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,8 +1,6 @@ ### SMP server address -You can find the fingerprint in the SimpleX Chat service in the webadmin - -Your SMP server address should look like this: +Your SMP server address: ``` smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 532b2fb..6c4b5de 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,8 +1,6 @@ ### Adresse du serveur SMP -Vous pouvez trouver l'empreinte digitale dans le service SimpleX Chat dans la webadmin. - -L'adresse de votre serveur SMP devrait ressembler à ceci : +L'adresse de votre serveur SMP est : ``` smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ From 7a5ca83c2cf99a38aff2fc844540933e3723bea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:56:06 +0100 Subject: [PATCH 16/22] Fix --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 5461e50..2cef887 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -3,7 +3,7 @@ Your SMP server address: ``` -smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ +smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ ``` For mobile clients, open Settings, find an option "SMP servers", toggle "Configure SMP Servers" to on, then enter the SMP Servers Address for all servers you want the client to use. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 6c4b5de..47b2eb2 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -3,7 +3,7 @@ L'adresse de votre serveur SMP est : ``` -smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ +smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ ``` Pour les clients mobiles, ouvrez Paramètres, recherchez une option "Serveurs SMP", activez "Configurer les serveurs SMP", puis entrez l'adresse des serveurs SMP pour tous les serveurs que vous souhaitez que le client utilise. From 01ec8965e0be1a302c5d7eb21ba0ed4ce203bc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:56:23 +0100 Subject: [PATCH 17/22] Update POST_INSTALL.md --- doc/POST_INSTALL.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 31432cc..972dca1 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,5 +1,4 @@ Your SMP server address: -``` -smp://__FINGERPRINT__=@__PUBLIC_IP4__:__PORT__ -``` +smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ + From 8c9a65ca2e72db6e162cb27215d1824c0e5b0572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:57:39 +0100 Subject: [PATCH 18/22] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index aed0933..ac32450 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,7 +15,7 @@ website = "https://simplex.chat/" code = "https://github.com/simplex-chat/simplex-chat" [integration] -yunohost = ">= 11.1.12" +yunohost = ">= 11.1.13" architectures = ["amd64"] multi_instance = false ldap = "not_relevant" From 15b0cd678498a1fd817bdd9da11d42db2cfe84d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:08:20 +0100 Subject: [PATCH 19/22] Create POST_INSTALL_fr.md --- doc/POST_INSTALL_fr.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/POST_INSTALL_fr.md diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md new file mode 100644 index 0000000..132e29d --- /dev/null +++ b/doc/POST_INSTALL_fr.md @@ -0,0 +1,4 @@ +Adresse de votre serveur SMP : + +smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ + From 23049abf2590e0573eddab6414cbdd9976a35ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Mar 2023 11:30:27 +0100 Subject: [PATCH 20/22] Update manifest.toml --- manifest.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifest.toml b/manifest.toml index ac32450..d251437 100644 --- a/manifest.toml +++ b/manifest.toml @@ -13,6 +13,8 @@ maintainers = ["eric_G"] license = "AGPL-3.0" website = "https://simplex.chat/" code = "https://github.com/simplex-chat/simplex-chat" +cpe = "cpe:2.3:a:simplex:simplex_chat" +fund = "https://opencollective.com/simplex-chat" [integration] yunohost = ">= 11.1.13" From 170e5fc5995e7ab0dee091f10818ce30dd425863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Mar 2023 11:31:48 +0100 Subject: [PATCH 21/22] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 19a621a..bd759cf 100755 --- a/scripts/install +++ b/scripts/install @@ -27,11 +27,11 @@ chmod +x $install_dir/smp-server pushd "$install_dir" public_ip4="$(curl -s ip.yunohost.org)" || true + ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 ./smp-server init --no-password --ip $public_ip4 -y popd fingerprint=$(cat /etc/opt/simplex/fingerprint) -ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint chown -R $app:$app "/etc/opt/simplex" From 28da48c36573598e9fbf80fb153d11eed174f6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Mar 2023 11:47:14 +0100 Subject: [PATCH 22/22] Fix --- doc/ADMIN.md | 2 -- doc/ADMIN_fr.md | 2 -- manifest.toml | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 2cef887..40a65a8 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,5 +1,3 @@ -### SMP server address - Your SMP server address: ``` diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 47b2eb2..c725c68 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,5 +1,3 @@ -### Adresse du serveur SMP - L'adresse de votre serveur SMP est : ``` diff --git a/manifest.toml b/manifest.toml index d251437..d06e529 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,7 +23,7 @@ multi_instance = false ldap = "not_relevant" sso = "not_relevant" disk = "50M" -ram.build = "50M" +ram.build = "150M" ram.runtime = "50M" [install]