From 418d0d63bb3442b1fbde63d8e9a4c8e855d235cc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 23 May 2023 14:20:47 +0000 Subject: [PATCH 01/46] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9769761..6633016 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in SimpleX - the first messaging platform operating without user identifiers of any kind - 100% private by design! iOS and Android apps are released. -**Shipped version:** 5.0.0~ynh1 +**Shipped version:** 5.0.0~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 35c6a26..91d9689 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po SimpleX - la première plate-forme de messagerie qui n'a aucun identifiant d'utilisateur d'aucune sorte - 100 % privée de par sa conception ! -**Version incluse :** 5.0.0~ynh1 +**Version incluse :** 5.0.0~ynh2 ## Captures d’écran From 3dc709f8a194c1192a8157590aa65aae4372ce64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:23:43 +0200 Subject: [PATCH 02/46] Update manifest.toml --- manifest.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manifest.toml b/manifest.toml index 59574ab..b5c9921 100644 --- a/manifest.toml +++ b/manifest.toml @@ -41,6 +41,15 @@ ram.runtime = "50M" extract = false rename = "smp-server" + [resources.sources.xftp] + amd64.url = "https://github.com/YunoHost-Apps/simplex_ynh/releases/download/v5.0.0.1/xftp-server_amd64" + amd64.sha256 = "" + arm64.url = "https://github.com/YunoHost-Apps/simplex_ynh/releases/download/v5.0.0.1/xftp-server_arm64" + arm64.sha256 = "e48e2a57e1992616e33be2b1bda564a978f8bdef3a5e30dce55712bc66278348" + in_subdir = false + extract = false + rename = "xftp-server" + [resources.ports] main.default = 5223 main.exposed = "TCP" From 5b8bf094ed4c84809c5d96ca3a514d34a4e162db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:39:02 +0200 Subject: [PATCH 03/46] fix --- conf/xftp.systemd.service | 50 +++++++++++++++++++++++++++++++++++++++ scripts/backup | 1 + scripts/install | 5 ++++ scripts/remove | 1 + scripts/restore | 4 ++++ scripts/upgrade | 6 +++++ 6 files changed, 67 insertions(+) create mode 100644 conf/xftp.systemd.service diff --git a/conf/xftp.systemd.service b/conf/xftp.systemd.service new file mode 100644 index 0000000..d7c20dc --- /dev/null +++ b/conf/xftp.systemd.service @@ -0,0 +1,50 @@ +[Unit] +Description=SimpleX: Messaging Protocol Server +After=network.target + +[Service] +Type=simple +User=__APP__ +Group=__APP__ +WorkingDirectory=__INSTALL_DIR__/ +ExecStart=__INSTALL_DIR__/xftp-server start +Restart=always +RestartSec=3 +KillSignal=SIGINT + +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectClock=yes +ProtectHostname=yes +ProtectProc=invisible +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallArchitectures=native +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index 3adb9d7..9fae3cc 100755 --- a/scripts/backup +++ b/scripts/backup @@ -28,6 +28,7 @@ ynh_backup --src_path="/etc/opt/simplex" #================================================= ynh_backup --src_path="/etc/systemd/system/$app.service" +ynh_backup --src_path="/etc/systemd/system/xftp.service" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 7b1847c..6052636 100755 --- a/scripts/install +++ b/scripts/install @@ -16,10 +16,12 @@ 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" +ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" chmod +x $install_dir/smp-server +chmod +x $install_dir/xftp-server #================================================= # SPECIFIC SETUP @@ -29,6 +31,7 @@ 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 + ./ftp-server init -l -p /srv/xftp "$@" popd fingerprint=$(cat /etc/opt/simplex/fingerprint) @@ -43,6 +46,7 @@ ynh_script_progression --message="Adding system configurations related to $app.. # Create a dedicated systemd config ynh_add_systemd_config +ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" @@ -53,6 +57,7 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name="xftp" --action="start" --log_path="/var/log/$app/$app.log" #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 33d032c..629dea0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,6 +20,7 @@ if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=1 yunohost service remove $app + yunohost service remove xftp fi #================================================= diff --git a/scripts/restore b/scripts/restore index 6eb851b..033bc7d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -32,8 +32,11 @@ chown -R $app:$app "/etc/opt/simplex" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +ynh_restore_file --origin_path="/etc/systemd/system/xftp.service" +systemctl enable xftp.service --quiet yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" +yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" #================================================= # START SYSTEMD SERVICE @@ -41,6 +44,7 @@ yunohost service add $app --description="Messaging platform" --log="/var/log/$ap 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" +ynh_systemd_action --service_name=xftp --action="start" --log_path="/var/log/$app/$app.log" #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 5de770f..67bf7fa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,6 +32,7 @@ ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint 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" +ynh_systemd_action --service_name=xftp --action="stop" --log_path="/var/log/$app/$app.log" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -43,11 +44,13 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" + ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" fi chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/smp-server +chmod +x $install_dir/xftp-server #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -56,8 +59,10 @@ ynh_script_progression --message="Upgrading system configurations related to $ap # Create a dedicated systemd config ynh_add_systemd_config +ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" +yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" #================================================= # START SYSTEMD SERVICE @@ -65,6 +70,7 @@ yunohost service add $app --description="Messaging platform" --log="/var/log/$ap 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" +ynh_systemd_action --service_name=xftp --action="start" --log_path="/var/log/$app/$app.log" #================================================= # END OF SCRIPT From 53d6e94b51b762973556063ab28d05a4495bf1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:41:04 +0200 Subject: [PATCH 04/46] fix --- conf/xftp.systemd.service | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/xftp.systemd.service b/conf/xftp.systemd.service index d7c20dc..0f29b5d 100644 --- a/conf/xftp.systemd.service +++ b/conf/xftp.systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=SimpleX: Messaging Protocol Server +Description=XFTP server systemd service After=network.target [Service] @@ -7,10 +7,11 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=__INSTALL_DIR__/xftp-server start -Restart=always -RestartSec=3 +ExecStart=__INSTALL_DIR__/xftp-server start +RTS -N -RTS +#ExecStopPost=/usr/bin/env sh -c '[ -e "/var/opt/simplex-xftp/file-server-store.log" ] && cp "/var/opt/simplex-xftp/file-server-store.log" "/var/opt/simplex-xftp/file-server-store.log.$(date +'%FT%T')"' +LimitNOFILE=65535 KillSignal=SIGINT +TimeoutStopSec=infinity # Sandboxing options to harden security # Depending on specificities of your service/app, you may need to tweak these From 066f168d8f75549d64d591d33db2ea41dfb8aecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:42:47 +0200 Subject: [PATCH 05/46] Update xftp.systemd.service --- conf/xftp.systemd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/xftp.systemd.service b/conf/xftp.systemd.service index 0f29b5d..f844cbf 100644 --- a/conf/xftp.systemd.service +++ b/conf/xftp.systemd.service @@ -1,5 +1,6 @@ [Unit] Description=XFTP server systemd service +Documentation=https://simplex.chat/docs/xftp-server.html After=network.target [Service] From c0b11a79d96bd43a20ac4959c0c7a374337b5a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:47:36 +0200 Subject: [PATCH 06/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6052636..32ab050 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./ftp-server init -l -p /srv/xftp "$@" + ./xftp-server init --ip $public_ip4 --store-log --path /srv/xftp "$@" popd fingerprint=$(cat /etc/opt/simplex/fingerprint) From 62d6868e8e9db60e4b8521a86c14dac9edb273f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:52:31 +0200 Subject: [PATCH 07/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b5c9921..bde073e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -43,7 +43,7 @@ ram.runtime = "50M" [resources.sources.xftp] amd64.url = "https://github.com/YunoHost-Apps/simplex_ynh/releases/download/v5.0.0.1/xftp-server_amd64" - amd64.sha256 = "" + amd64.sha256 = "24535308621ff9e46d4630fde74cc2f1c8892f1ce1230ce6a538892be64d34f6" arm64.url = "https://github.com/YunoHost-Apps/simplex_ynh/releases/download/v5.0.0.1/xftp-server_arm64" arm64.sha256 = "e48e2a57e1992616e33be2b1bda564a978f8bdef3a5e30dce55712bc66278348" in_subdir = false From 511f4fc7c53492068db3aae00186ca755932acb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:57:58 +0200 Subject: [PATCH 08/46] fix --- doc/ADMIN.md | 1 + doc/ADMIN_fr.md | 1 + doc/POST_INSTALL.md | 1 + doc/POST_INSTALL_fr.md | 1 + doc/POST_UPGRADE.md | 1 + doc/POST_UPGRADE_fr.md | 1 + scripts/install | 3 +++ 7 files changed, 9 insertions(+) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 17f099b..de42fa5 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,6 +2,7 @@ Your SMP server address: ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ ``` Mobile clients are available for [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084), [Android](https://play.google.com/store/apps/details?id=chat.simplex.app) and [f-droid](https://app.simplex.chat). diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 35e5aa0..9edf1ee 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -2,6 +2,7 @@ L'adresse de votre serveur SMP est : ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ ``` Les clients mobiles sont disponibles pour [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084), [Android](https://play.google.com/store/apps/details?id=chat.simplex.app) et [f-droid](https://app.simplex.chat). diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index c7220db..5ca9f82 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,3 +1,4 @@ Your SMP server address: smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index 531d913..a9fe76e 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,3 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ diff --git a/doc/POST_UPGRADE.md b/doc/POST_UPGRADE.md index c7220db..bf546fa 100644 --- a/doc/POST_UPGRADE.md +++ b/doc/POST_UPGRADE.md @@ -1,3 +1,4 @@ Your SMP server address: smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ \ No newline at end of file diff --git a/doc/POST_UPGRADE_fr.md b/doc/POST_UPGRADE_fr.md index 531d913..a9fe76e 100644 --- a/doc/POST_UPGRADE_fr.md +++ b/doc/POST_UPGRADE_fr.md @@ -1,3 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ diff --git a/scripts/install b/scripts/install index 32ab050..123e825 100755 --- a/scripts/install +++ b/scripts/install @@ -37,6 +37,9 @@ popd fingerprint=$(cat /etc/opt/simplex/fingerprint) ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint +xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) +ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint + chown -R $app:$app "/etc/opt/simplex" #================================================= From 45b793474a50df1bf36449f3a13ade867eec8d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 16:59:31 +0200 Subject: [PATCH 09/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 123e825..ea85406 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./xftp-server init --ip $public_ip4 --store-log --path /srv/xftp "$@" + ./xftp-server init --ip $public_ip4 -q '20gb' --store-log --path /srv/xftp "$@" popd fingerprint=$(cat /etc/opt/simplex/fingerprint) From 7e6e4f8042348dc2accc05c653467b468c3d4304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:02:54 +0200 Subject: [PATCH 10/46] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index ea85406..e66f15b 100755 --- a/scripts/install +++ b/scripts/install @@ -52,6 +52,7 @@ ynh_add_systemd_config ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" +yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" #================================================= # START SYSTEMD SERVICE From 206ad21b0b28aeec126180196b35cb43aaaaa94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:15:04 +0200 Subject: [PATCH 11/46] fix --- manifest.toml | 2 ++ scripts/install | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bde073e..016ee62 100644 --- a/manifest.toml +++ b/manifest.toml @@ -59,4 +59,6 @@ ram.runtime = "50M" [resources.install_dir] dir = "/usr/local/bin/__APP__" + [resources.data_dir] + [resources.permissions] diff --git a/scripts/install b/scripts/install index e66f15b..491504a 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./xftp-server init --ip $public_ip4 -q '20gb' --store-log --path /srv/xftp "$@" + ./xftp-server init --ip $public_ip4 -q '20gb' --store-log --path $data_dir popd fingerprint=$(cat /etc/opt/simplex/fingerprint) From 6b8e95d64850358f24779768f494e7349f0baf6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:19:19 +0200 Subject: [PATCH 12/46] Update remove --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 629dea0..9468f33 100755 --- a/scripts/remove +++ b/scripts/remove @@ -35,6 +35,7 @@ ynh_remove_systemd_config # Remove the app directory securely ynh_secure_remove --file="/etc/opt/simplex" +ynh_secure_remove --file="/etc/opt/simplex-xftp" #================================================= # END OF SCRIPT From 2aa5cfb6656e495aa7cc1df4b5528c073e551238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:24:23 +0200 Subject: [PATCH 13/46] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 491504a..09a053c 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./xftp-server init --ip $public_ip4 -q '20gb' --store-log --path $data_dir + ./xftp-server init --no-password --ip $public_ip4 -q '20gb' --store-log --path $data_dir popd fingerprint=$(cat /etc/opt/simplex/fingerprint) @@ -41,6 +41,7 @@ xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint chown -R $app:$app "/etc/opt/simplex" +chown -R $app:$app "/etc/opt/simplex-xftp" #================================================= # SYSTEM CONFIGURATION From 29985a3aef3250b2288810d6b45df8978384bf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:27:53 +0200 Subject: [PATCH 14/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 09a053c..0c344d0 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./xftp-server init --no-password --ip $public_ip4 -q '20gb' --store-log --path $data_dir + ./xftp-server init --ip $public_ip4 -q '20gb' --store-log --path $data_dir popd fingerprint=$(cat /etc/opt/simplex/fingerprint) From 01bb5c896470fd6df249c50fa47e11cacacec947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:30:12 +0200 Subject: [PATCH 15/46] Update xftp.systemd.service --- conf/xftp.systemd.service | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/conf/xftp.systemd.service b/conf/xftp.systemd.service index f844cbf..c473f09 100644 --- a/conf/xftp.systemd.service +++ b/conf/xftp.systemd.service @@ -9,44 +9,11 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ ExecStart=__INSTALL_DIR__/xftp-server start +RTS -N -RTS -#ExecStopPost=/usr/bin/env sh -c '[ -e "/var/opt/simplex-xftp/file-server-store.log" ] && cp "/var/opt/simplex-xftp/file-server-store.log" "/var/opt/simplex-xftp/file-server-store.log.$(date +'%FT%T')"' +ExecStopPost=/usr/bin/env sh -c '[ -e "/var/opt/simplex-xftp/file-server-store.log" ] && cp "/var/opt/simplex-xftp/file-server-store.log" "/var/opt/simplex-xftp/file-server-store.log.$(date +'%FT%T')"' LimitNOFILE=65535 KillSignal=SIGINT TimeoutStopSec=infinity - -# Sandboxing options to harden security -# Depending on specificities of your service/app, you may need to tweak these -# .. but this should be a good baseline -# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html -NoNewPrivileges=yes -PrivateTmp=yes -PrivateDevices=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK -RestrictNamespaces=yes -RestrictRealtime=yes -DevicePolicy=closed -ProtectClock=yes -ProtectHostname=yes -ProtectProc=invisible -ProtectSystem=full -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes -LockPersonality=yes -SystemCallArchitectures=native -SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged - -# Denying access to capabilities that should not be relevant for webapps -# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html -CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD -CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE -CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT -CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK -CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM -CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG -CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE -CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW -CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG +AmbientCapabilities=CAP_NET_BIND_SERVICE [Install] WantedBy=multi-user.target \ No newline at end of file From 9312edc6042c7e0370238957d1201ed5c1c820bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:31:41 +0200 Subject: [PATCH 16/46] Update remove --- scripts/remove | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/remove b/scripts/remove index 9468f33..4799f87 100755 --- a/scripts/remove +++ b/scripts/remove @@ -37,6 +37,9 @@ ynh_remove_systemd_config ynh_secure_remove --file="/etc/opt/simplex" ynh_secure_remove --file="/etc/opt/simplex-xftp" +ynh_secure_remove --file="/var/opt/simplex" +ynh_secure_remove --file="/var/opt/simplex-xftp" + #================================================= # END OF SCRIPT #================================================= From 8a6254fee2aadba4b8f88b0068e93ca5ac8fc168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:33:44 +0200 Subject: [PATCH 17/46] Update xftp.systemd.service --- conf/xftp.systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/xftp.systemd.service b/conf/xftp.systemd.service index c473f09..6b13866 100644 --- a/conf/xftp.systemd.service +++ b/conf/xftp.systemd.service @@ -9,7 +9,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ ExecStart=__INSTALL_DIR__/xftp-server start +RTS -N -RTS -ExecStopPost=/usr/bin/env sh -c '[ -e "/var/opt/simplex-xftp/file-server-store.log" ] && cp "/var/opt/simplex-xftp/file-server-store.log" "/var/opt/simplex-xftp/file-server-store.log.$(date +'%FT%T')"' +#ExecStopPost=/usr/bin/env sh -c '[ -e "/var/opt/simplex-xftp/file-server-store.log" ] && cp "/var/opt/simplex-xftp/file-server-store.log" "/var/opt/simplex-xftp/file-server-store.log.$(date +'%FT%T')"' LimitNOFILE=65535 KillSignal=SIGINT TimeoutStopSec=infinity From 0110ea6009bf4ccdb9ddf463211e47e89f414f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:44:58 +0200 Subject: [PATCH 18/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0c344d0..2eacb50 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./xftp-server init --ip $public_ip4 -q '20gb' --store-log --path $data_dir + ./xftp-server init --ip $public_ip4 --fqdn $domain --quota '20gb' --store-log --path $data_dir popd fingerprint=$(cat /etc/opt/simplex/fingerprint) From a3c8e40cc497909ab13646707bf3ecb9c7d6aa18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:47:05 +0200 Subject: [PATCH 19/46] Update manifest.toml --- manifest.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manifest.toml b/manifest.toml index 016ee62..7f7793e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -54,6 +54,9 @@ ram.runtime = "50M" main.default = 5223 main.exposed = "TCP" + [install.domain] + type = "domain" + [resources.system_user] [resources.install_dir] From 1f1a06111b24febc75bdf991c4fae1ba96d01974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:49:05 +0200 Subject: [PATCH 20/46] fix --- manifest.toml | 3 --- scripts/install | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 7f7793e..016ee62 100644 --- a/manifest.toml +++ b/manifest.toml @@ -54,9 +54,6 @@ ram.runtime = "50M" main.default = 5223 main.exposed = "TCP" - [install.domain] - type = "domain" - [resources.system_user] [resources.install_dir] diff --git a/scripts/install b/scripts/install index 2eacb50..e479e3f 100755 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,7 @@ 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 - ./xftp-server init --ip $public_ip4 --fqdn $domain --quota '20gb' --store-log --path $data_dir + ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd fingerprint=$(cat /etc/opt/simplex/fingerprint) From b905f17e56d375b54757e65cda4d9fbb257d7ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:49:47 +0200 Subject: [PATCH 21/46] fix --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- doc/POST_INSTALL.md | 2 +- doc/POST_INSTALL_fr.md | 2 +- doc/POST_UPGRADE.md | 2 +- doc/POST_UPGRADE_fr.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index de42fa5..5cc8c22 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,7 +2,7 @@ Your SMP server address: ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 ``` Mobile clients are available for [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084), [Android](https://play.google.com/store/apps/details?id=chat.simplex.app) and [f-droid](https://app.simplex.chat). diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 9edf1ee..bf99b1e 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -2,7 +2,7 @@ L'adresse de votre serveur SMP est : ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 ``` Les clients mobiles sont disponibles pour [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084), [Android](https://play.google.com/store/apps/details?id=chat.simplex.app) et [f-droid](https://app.simplex.chat). diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 5ca9f82..7737c8c 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,4 +1,4 @@ Your SMP server address: smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index a9fe76e..b9e72ff 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,4 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 diff --git a/doc/POST_UPGRADE.md b/doc/POST_UPGRADE.md index bf546fa..d2a6299 100644 --- a/doc/POST_UPGRADE.md +++ b/doc/POST_UPGRADE.md @@ -1,4 +1,4 @@ Your SMP server address: smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ \ No newline at end of file +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 \ No newline at end of file diff --git a/doc/POST_UPGRADE_fr.md b/doc/POST_UPGRADE_fr.md index a9fe76e..b9e72ff 100644 --- a/doc/POST_UPGRADE_fr.md +++ b/doc/POST_UPGRADE_fr.md @@ -1,4 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT__ +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 From 9912dd111e95008ffd916f53fadec9bbd056b52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 17:53:54 +0200 Subject: [PATCH 22/46] Update install --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index e479e3f..28bde8d 100755 --- a/scripts/install +++ b/scripts/install @@ -18,6 +18,9 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" +mkdir -p /var/opt/simplex-xftp /etc/opt/simplex-xftp +chown -R $app:$app /var/opt/simplex-xftp /etc/opt/simplex-xftp + chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" chmod +x $install_dir/smp-server From eb25e09ffe29a74de71325e53452b21dab605abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:05:18 +0200 Subject: [PATCH 23/46] fix --- doc/POST_INSTALL.md | 2 +- doc/POST_INSTALL_fr.md | 2 +- doc/POST_UPGRADE_fr.md | 2 +- manifest.toml | 2 ++ scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 7737c8c..c9323ca 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,4 +1,4 @@ Your SMP server address: smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index b9e72ff..25095f8 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,4 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ diff --git a/doc/POST_UPGRADE_fr.md b/doc/POST_UPGRADE_fr.md index b9e72ff..5b1642b 100644 --- a/doc/POST_UPGRADE_fr.md +++ b/doc/POST_UPGRADE_fr.md @@ -1,4 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:5224 diff --git a/manifest.toml b/manifest.toml index 016ee62..52202f3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,6 +53,8 @@ ram.runtime = "50M" [resources.ports] main.default = 5223 main.exposed = "TCP" + xftp.default = 5224 + xftp.exposed = "TCP" [resources.system_user] diff --git a/scripts/install b/scripts/install index 28bde8d..130d325 100755 --- a/scripts/install +++ b/scripts/install @@ -56,7 +56,7 @@ ynh_add_systemd_config ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" -yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" +yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_xftp" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 033bc7d..2cd2443 100755 --- a/scripts/restore +++ b/scripts/restore @@ -36,7 +36,7 @@ ynh_restore_file --origin_path="/etc/systemd/system/xftp.service" systemctl enable xftp.service --quiet yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" -yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" +yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_xftp" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 67bf7fa..9f9f698 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,7 +62,7 @@ ynh_add_systemd_config ynh_add_systemd_config --service=xftp --template=../conf/xftp.systemd.service yunohost service add $app --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" -yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" +yunohost service add xftp --description="Messaging platform" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_xftp" #================================================= # START SYSTEMD SERVICE From a6b4eb633971e4725f941995990c4d4597a7b0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:18:23 +0200 Subject: [PATCH 24/46] fix --- conf/file-server.ini | 32 ++++++++++++++++++++++++++++++++ scripts/install | 12 ++++++++++++ scripts/upgrade | 13 +++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 conf/file-server.ini diff --git a/conf/file-server.ini b/conf/file-server.ini new file mode 100644 index 0000000..dca8dc4 --- /dev/null +++ b/conf/file-server.ini @@ -0,0 +1,32 @@ + 1,1 All +[STORE_LOG] +# The server uses STM memory for persistence, +# that will be lost on restart (e.g., as with redis). +# This option enables saving memory to append only log, +# and restoring it when the server is started. +# Log is compacted on start (deleted objects are removed). +enable: on + +log_stats: off + +[AUTH] +# Set new_files option to off to completely prohibit uploading new files. +# This can be useful when you want to decommission the server, but still allow downloading the existing files. +new_files: on + +# Use create_password option to enable basic auth to upload new files. +# The password should be used as part of server address in client configuration: +# xftp://fingerprint:password@host1,host2 +# The password will not be shared with file recipients, you must share it only +# with the users who you want to allow uploading files to your server. +# create_password: password to upload files (any printable ASCII characters without whitespace, '@', ':' and '/') + +[TRANSPORT] +# host is only used to print server address on start +host: __PUBLIC_IP4__ +port: __PORT__ +log_tls_errors: off + +[FILES] +path: __DATA_DIR__ +storage_quota: 20gb diff --git a/scripts/install b/scripts/install index 130d325..51650e4 100755 --- a/scripts/install +++ b/scripts/install @@ -43,9 +43,21 @@ ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint +ynh_replace_string --match_string="port: 443" --replace_string="port:$port_xftp" --target_file=target_file + chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" + +chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" + #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9f9f698..dc29735 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,11 +47,24 @@ then ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" fi +mkdir -p /var/opt/simplex-xftp /etc/opt/simplex-xftp +chown -R $app:$app /var/opt/simplex-xftp /etc/opt/simplex-xftp + chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/smp-server chmod +x $install_dir/xftp-server +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" + +chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From d9c13a96932f476cdcdeb224ff23e832166ff11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:19:32 +0200 Subject: [PATCH 25/46] fix --- conf/file-server.ini | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/file-server.ini b/conf/file-server.ini index dca8dc4..f8730f1 100644 --- a/conf/file-server.ini +++ b/conf/file-server.ini @@ -24,7 +24,7 @@ new_files: on [TRANSPORT] # host is only used to print server address on start host: __PUBLIC_IP4__ -port: __PORT__ +port: __PORT_XFTP__ log_tls_errors: off [FILES] diff --git a/scripts/install b/scripts/install index 51650e4..bb1d2a8 100755 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,7 @@ ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint -ynh_replace_string --match_string="port: 443" --replace_string="port:$port_xftp" --target_file=target_file +#ynh_replace_string --match_string="port: 443" --replace_string="port:$port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" From a1e54bc2fedfc3d026ec52e1ed826f4b1b83fe3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:25:08 +0200 Subject: [PATCH 26/46] Update install --- scripts/install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index bb1d2a8..979f588 100755 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,7 @@ ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint -#ynh_replace_string --match_string="port: 443" --replace_string="port:$port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" +ynh_replace_string --match_string="port: 443" --replace_string="port:$port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" @@ -51,12 +51,12 @@ chown -R $app:$app "/etc/opt/simplex-xftp" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # SYSTEM CONFIGURATION From 4ae24be3158c2d62e38e0880cac02eec04ecac30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:26:58 +0200 Subject: [PATCH 27/46] fix --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- doc/POST_UPGRADE.md | 2 +- doc/POST_UPGRADE_fr.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 5cc8c22..73c2488 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,7 +2,7 @@ Your SMP server address: ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ ``` Mobile clients are available for [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084), [Android](https://play.google.com/store/apps/details?id=chat.simplex.app) and [f-droid](https://app.simplex.chat). diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index bf99b1e..50a3505 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -2,7 +2,7 @@ L'adresse de votre serveur SMP est : ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ ``` Les clients mobiles sont disponibles pour [iOS](https://apps.apple.com/us/app/simplex-chat/id1605771084), [Android](https://play.google.com/store/apps/details?id=chat.simplex.app) et [f-droid](https://app.simplex.chat). diff --git a/doc/POST_UPGRADE.md b/doc/POST_UPGRADE.md index d2a6299..981da15 100644 --- a/doc/POST_UPGRADE.md +++ b/doc/POST_UPGRADE.md @@ -1,4 +1,4 @@ Your SMP server address: smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:443 \ No newline at end of file +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ \ No newline at end of file diff --git a/doc/POST_UPGRADE_fr.md b/doc/POST_UPGRADE_fr.md index 5b1642b..25095f8 100644 --- a/doc/POST_UPGRADE_fr.md +++ b/doc/POST_UPGRADE_fr.md @@ -1,4 +1,4 @@ Adresse de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ -xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:5224 +xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ From 8ba9b54f56b0d08ab168e56db4a0d22966acde14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:29:31 +0200 Subject: [PATCH 28/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 52202f3..836efcc 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,7 +53,7 @@ ram.runtime = "50M" [resources.ports] main.default = 5223 main.exposed = "TCP" - xftp.default = 5224 + xftp.default = 224 xftp.exposed = "TCP" [resources.system_user] From 8bb68f369dae784a8b152fd778bb29184a6f42c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:35:45 +0200 Subject: [PATCH 29/46] fix --- doc/ADMIN_fr.md | 2 +- doc/POST_INSTALL_fr.md | 2 +- doc/POST_UPGRADE_fr.md | 2 +- manifest.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 50a3505..72b4840 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,4 +1,4 @@ -L'adresse de votre serveur SMP est : +Les adresses de votre serveur SMP est : ``` smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index 25095f8..c7aae49 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,4 +1,4 @@ -Adresse de votre serveur SMP : +Adresses de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ diff --git a/doc/POST_UPGRADE_fr.md b/doc/POST_UPGRADE_fr.md index 25095f8..c7aae49 100644 --- a/doc/POST_UPGRADE_fr.md +++ b/doc/POST_UPGRADE_fr.md @@ -1,4 +1,4 @@ -Adresse de votre serveur SMP : +Adresses de votre serveur SMP : smp://__FINGERPRINT__@__PUBLIC_IP4__:__PORT__ xftp://__XFTP_FINGERPRINT__@__PUBLIC_IP4__:__PORT_XFTP__ diff --git a/manifest.toml b/manifest.toml index 836efcc..52202f3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,7 +53,7 @@ ram.runtime = "50M" [resources.ports] main.default = 5223 main.exposed = "TCP" - xftp.default = 224 + xftp.default = 5224 xftp.exposed = "TCP" [resources.system_user] From 0c90c0458c85f34cb068ba301d2b3ec987c56949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:38:10 +0200 Subject: [PATCH 30/46] fix --- scripts/install | 5 +++-- scripts/restore | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 979f588..280438f 100755 --- a/scripts/install +++ b/scripts/install @@ -30,9 +30,10 @@ chmod +x $install_dir/xftp-server # SPECIFIC SETUP #================================================= +public_ip4="$(curl -s ip.yunohost.org)" || true +ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 + 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 ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd diff --git a/scripts/restore b/scripts/restore index 2cd2443..fcc6eb2 100755 --- a/scripts/restore +++ b/scripts/restore @@ -20,6 +20,16 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$data_dir" --not_mandatory + +# (Same as for install dir) +chown -R $app:www-data "$data_dir" + #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= From ab07f2784a9fc4d1fad3071dbe89d0193b796338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:39:50 +0200 Subject: [PATCH 31/46] Update upgrade --- scripts/upgrade | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index dc29735..0b397b9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,8 +21,10 @@ upgrade_type=$(ynh_check_app_version_changed) public_ip4="$(curl -s ip.yunohost.org)" || true fingerprint=$(cat /etc/opt/simplex/fingerprint) +xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint +ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint #================================================= # STANDARD UPGRADE STEPS @@ -58,12 +60,12 @@ chmod +x $install_dir/xftp-server #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # REAPPLY SYSTEM CONFIGURATIONS From dd2d65354af89871a13c6330c280faf41c3549bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:47:17 +0200 Subject: [PATCH 32/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 280438f..9d7e106 100755 --- a/scripts/install +++ b/scripts/install @@ -44,7 +44,7 @@ ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint -ynh_replace_string --match_string="port: 443" --replace_string="port:$port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" +ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" From 8f09e2808b79d569544cb3485e549eb779eefdd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:56:10 +0200 Subject: [PATCH 33/46] fix --- conf/file-server.ini | 2 +- config_panel.toml | 14 ++ config_panel.toml.example | 295 -------------------------------------- scripts/install | 17 ++- scripts/upgrade | 18 ++- 5 files changed, 41 insertions(+), 305 deletions(-) create mode 100644 config_panel.toml delete mode 100644 config_panel.toml.example diff --git a/conf/file-server.ini b/conf/file-server.ini index f8730f1..b0aafc8 100644 --- a/conf/file-server.ini +++ b/conf/file-server.ini @@ -29,4 +29,4 @@ log_tls_errors: off [FILES] path: __DATA_DIR__ -storage_quota: 20gb +storage_quota: __STORAGE_QUOTA__ diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..fcaabe2 --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,14 @@ +version = "1.0" + +[main] +name = "Simplex configuration" +services = ["xftp"] + + [main.config] + name = "Configuration Options" + + [main.config.storage_quota] + ask = "File storage quota" + type = "string" + help = "File storage quota (e.g. 100gb)" + bind = "storage_quota:/etc/opt/simplex-xftp/file-server.ini" diff --git a/config_panel.toml.example b/config_panel.toml.example deleted file mode 100644 index c6bccd8..0000000 --- a/config_panel.toml.example +++ /dev/null @@ -1,295 +0,0 @@ - -## Config panel are available from webadmin > Apps > YOUR_APP > Config Panel Button -## Those panels let user configure some params on their apps using a friendly interface, -## and remove the need to manually edit files from the command line. - -## From a packager perspective, this .toml is coupled to the scripts/config script, -## which may be used to define custom getters/setters. However, most use cases -## should be covered automagically by the core, thus it may not be necessary -## to define a scripts/config at all! - -## ----------------------------------------------------------------------------- -## IMPORTANT: In accordance with YunoHost's spirit, please keep things simple and -## do not overwhelm the admin with tons of misunderstandable or advanced settings. -## ----------------------------------------------------------------------------- - -## The top level describe the entire config panels screen. - -## The version is a required property. -## Here a small reminder to associate config panel version with YunoHost version -## | Config | YNH | Config panel small change log | -## | ------ | --- | ------------------------------------------------------- | -## | 0.1 | 3.x | 0.1 config script not compatible with YNH >= 4.3 | -## | 1.0 | 4.3.x | The new config panel system with 'bind' property | -version = "1.0" - -## (optional) i18n property let you internationalize questions, however this feature -## is only available in core configuration panel (like yunohost domain config). -## So in app config panel this key is ignored for now, but you can internationalize -## by using a lang dictionary (see property name bellow) -# i18n = "prefix_translation_key" - -################################################################################ -#### ABOUT PANELS -################################################################################ - -## The next level describes web admin panels -## You have to choose an ID for each panel, in this example the ID is "main" -## Keep in mind this ID will be used in CLI to refer to your question, so choose -## something short and meaningfull. -## In the webadmin, each panel corresponds to a distinct tab / form -[main] - -## Define the label for your panel -## Internationalization works similarly to the 'description' and 'ask' questions in the manifest -# name.en = "Main configuration" -# name.fr = "Configuration principale" - -## (optional) If you need to trigger a service reload-or-restart after the user -## change a question in this panel, you can add your service in the list. -services = ["__APP__"] -# or services = ["nginx", "__APP__"] to also reload-or-restart nginx - -## (optional) This help properties is a short help displayed on the same line -## than the panel title but not displayed in the tab. -# help = "" - - ############################################################################ - #### ABOUT SECTIONS - ############################################################################ - - ## A panel is composed of one or several sections. - ## - ## Sections are meant to group questions together when they correspond to - ## a same subtopic. This impacts the rendering in terms of CLI prompts - ## and HTML forms - ## - ## You should choose an ID for your section, and prefix it with the panel ID - ## (Be sure to not make a typo in the panel ID, which would implicitly create - ## an other entire panel) - ## - ## We use the context of pepettes_ynh as an example, - ## which is a simple donation form app written in python, - ## and for which the admin will want to edit the configuration - [main.customization] - - ## (optional) Defining a proper title for sections is not mandatory - ## and depends on the exact rendering you're aiming for the CLI / webadmin - name = "" - - ## (optional) This help properties is a short help displayed on the same line - ## than the section title, meant to provide additional details - # help = "" - - ## (optional) As for panel, you can specify to trigger a service - ## reload-or-restart after the user change a question in this section. - ## This property is added to the panel property, it doesn't deactivate it. - ## So no need to replicate, the service list from panel services property. - # services = [] - - ## (optional) By default all questions are optionals, but you can specify a - ## default behaviour for question in the section - optional = false - - ## (optional) It's also possible with the 'visible' property to only - ## display the section depending on the user's answers to previous questions. - ## - ## Be careful that the 'visible' property should only refer to **previous** questions - ## Hence, it should not make sense to have a "visible" property on the very first section. - ## - ## Also, keep in mind that this feature only works in the webadmin and not in CLI - ## (therefore a user could be prompted in CLI for a question that may not be relevant) - # visible = true - - ######################################################################## - #### ABOUT QUESTIONS - ######################################################################## - - ## A section is compound of one or several questions. - - ## --------------------------------------------------------------------- - ## IMPORTANT: as for panel and section you have to choose an ID, but this - ## one should be unique in all this document, even if the question is in - ## an other panel. - ## --------------------------------------------------------------------- - - ## You can use same questions types and properties than in manifest.yml - ## install part. However, in YNH 4.3, a lot of change has been made to - ## extend availables questions types list. - ## See: TODO DOC LINK - - [main.customization.project_name] - - ## (required) The ask property is equivalent to the ask property in - ## the manifest. However, in config panels, questions are displayed on the - ## left side and therefore have less space to be rendered. Therefore, - ## it is better to use a short question, and use the "help" property to - ## provide additional details if necessary. - ask.en = "Name of the project" - - ## (required) The type property indicates how the question should be - ## displayed, validated and managed. Some types have specific properties. - ## - ## Types available: string, boolean, number, range, text, password, path - ## email, url, date, time, color, select, domain, user, tags, file. - ## - ## For a complete list with specific properties, see: TODO DOC LINK - type = "string" - - ######################################################################## - #### ABOUT THE BIND PROPERTY - ######################################################################## - - ## (recommended) 'bind' property is a powerful feature that let you - ## configure how and where the data will be read, validated and written. - - ## By default, 'bind property is in "settings" mode, it means it will - ## **only** read and write the value in application settings file. - ## bind = "settings" - - ## However, settings usually correspond to key/values in actual app configurations - ## Hence, a more useful mode is to have bind = ":FILENAME". In that case, YunoHost - ## will automagically find a line with "KEY=VALUE" in FILENAME - ## (with the adequate separator between KEY and VALUE) - ## - ## YunoHost will then use this value for the read/get operation. - ## During write/set operations, YunoHost will overwrite the value - ## in **both** FILENAME and in the app's settings.yml - - ## Configuration file format supported: yaml, toml, json, ini, env, php, - ## python. The feature probably works with others formats, but should be tested carefully. - - ## Note that this feature only works with relatively simple cases - ## such as `KEY: VALUE`, but won't properly work with - ## complex data structures like multilin array/lists or dictionnaries. - ## It also doesn't work with XML format, custom config function call, php define(), ... - - ## More info on TODO - # bind = ":/var/www/__APP__/settings.py" - - - ## By default, bind = ":FILENAME" will use the question ID as KEY - ## ... but the question ID may sometime not be the exact KEY name in the configuration file. - ## - ## In particular, in pepettes, the python variable is 'name' and not 'project_name' - ## (c.f. https://github.com/YunoHost-Apps/pepettes_ynh/blob/5cc2d3ffd6529cc7356ff93af92dbb6785c3ab9a/conf/settings.py##L11 ) - ## - ## In that case, the key name can be specified before the column ':' - - bind = "name:/var/www/__APP__/settings.py" - - ## --------------------------------------------------------------------- - ## IMPORTANT: other 'bind' mode exists: - ## - ## bind = "FILENAME" (with no column character before FILENAME) - ## may be used to bind to the **entire file content** (instead of a single KEY/VALUE) - ## This could be used to expose an entire configuration file, or binary files such as images - ## For example: - ## bind = "/var/www/__APP__/img/logo.png" - ## - ## bind = "null" can be used to disable reading / writing in settings. - ## This creates sort of a "virtual" or "ephemeral" question which is not related to any actual setting - ## In this mode, you are expected to define custom getter/setters/validators in scripts/config: - ## - ## getter: get__QUESTIONID() - ## setter: set__QUESTIONID() - ## validator: validate__QUESTIONID() - ## - ## You can also specify a common getter / setter / validator, with the - ## function 'bind' mode, for example here it will try to run - ## get__array_settings() first. - # bind = "array_settings()" - ## --------------------------------------------------------------------- - - ## --------------------------------------------------------------------- - ## IMPORTANT: with the exception of bind=null questions, - ## question IDs should almost **always** correspond to an app setting - ## initialized / reused during install/upgrade. - ## Not doing so may result in inconsistencies between the config panel mechanism - ## and the use of ynh_add_config - ## --------------------------------------------------------------------- - - ######################################################################## - #### OTHER GENERIC PROPERTY FOR QUESTIONS - ######################################################################## - - ## (optional) An help text for the question - help = "Fill the name of the project which will received donation" - - ## (optional) An example display as placeholder in web form - # example = "YunoHost" - - ## (optional) set to true in order to redact the value in operation logs - # redact = false - - ## (optional) A validation pattern - ## --------------------------------------------------------------------- - ## IMPORTANT: your pattern should be between simple quote, not double. - ## --------------------------------------------------------------------- - pattern.regexp = '^\w{3,30}$' - pattern.error = "The name should be at least 3 chars and less than 30 chars. Alphanumeric chars are accepted" - - ## Note: visible and optional properties are also available for questions - - - [main.customization.contact_url] - ask = "Contact url" - type = "url" - example = "mailto: contact@example.org" - help = "mailto: accepted" - pattern.regexp = '^mailto:[^@]+@[^@]+|https://$' - pattern.error = "Should be https or mailto:" - bind = ":/var/www/__APP__/settings.py" - - [main.customization.logo] - ask = "Logo" - type = "file" - accept = ".png" - help = "Fill with an already resized logo" - bind = "__FINALPATH__/img/logo.png" - - [main.customization.favicon] - ask = "Favicon" - type = "file" - accept = ".png" - help = "Fill with an already sized favicon" - bind = "__FINALPATH__/img/favicon.png" - - - [main.stripe] - name = "Stripe general info" - optional = false - - # The next alert is overwrited with a getter from the config script - [main.stripe.amount] - ask = "Donation in the month : XX € - type = "alert" - style = "success" - - [main.stripe.publishable_key] - ask = "Publishable key" - type = "string" - redact = true - help = "Indicate here the stripe publishable key" - bind = ":/var/www/__APP__/settings.py" - - [main.stripe.secret_key] - ask = "Secret key" - type = "string" - redact = true - help = "Indicate here the stripe secret key" - bind = ":/var/www/__APP__/settings.py" - - [main.stripe.prices] - ask = "Prices ID" - type = "tags" - help = """\ - Indicates here the prices ID of donation products you created in stripe interfaces. \ - Go on [Stripe products](https://dashboard.stripe.com/products) to create those donation products. \ - Fill it tag with 'FREQUENCY/CURRENCY/PRICE_ID' \ - FREQUENCY: 'one_time' or 'recuring' \ - CURRENCY: 'EUR' or 'USD' \ - PRICE_ID: ID from stripe interfaces starting with 'price_' \ - """ - pattern.regexp = '^(one_time|recuring)/(EUR|USD)/price_.*$' - pattern.error = "Please respect the format describe in help text for each price ID" diff --git a/scripts/install b/scripts/install index 9d7e106..9c90fe0 100755 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,13 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# RETRIEVE ARGUMENTS FROM THE MANIFEST +#================================================= + +storage_quota="20gb" +ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -44,7 +51,7 @@ ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint -ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" +#ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" @@ -52,12 +59,12 @@ chown -R $app:$app "/etc/opt/simplex-xftp" #================================================= # ADD A CONFIGURATION #================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # SYSTEM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 0b397b9..7c65054 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,6 +36,16 @@ 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" ynh_systemd_action --service_name=xftp --action="stop" --log_path="/var/log/$app/$app.log" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +if [ -z "${storage_quota:-}" ]; then + storage_quota="20gb" + ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -60,12 +70,12 @@ chmod +x $install_dir/xftp-server #================================================= # ADD A CONFIGURATION #================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # REAPPLY SYSTEM CONFIGURATIONS From 8ffa1c10766ea2e7700e06d07d8a43de2831ffbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 18:59:42 +0200 Subject: [PATCH 34/46] Update install --- scripts/install | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 9c90fe0..c7800ad 100755 --- a/scripts/install +++ b/scripts/install @@ -45,11 +45,11 @@ pushd "$install_dir" ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd -fingerprint=$(cat /etc/opt/simplex/fingerprint) -ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint +#fingerprint=$(cat /etc/opt/simplex/fingerprint) +#ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint -xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) -ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint +#xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) +#ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint #ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" @@ -87,6 +87,13 @@ 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" ynh_systemd_action --service_name="xftp" --action="start" --log_path="/var/log/$app/$app.log" + +fingerprint=$(cat /etc/opt/simplex/fingerprint) +ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint + +xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) +ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint + #================================================= # END OF SCRIPT #================================================= From c0009a1d2a521f866baaa18b2495d4d1561933e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:03:19 +0200 Subject: [PATCH 35/46] fix --- scripts/install | 29 +++++++++++------------------ scripts/upgrade | 8 ++++---- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/scripts/install b/scripts/install index c7800ad..249937f 100755 --- a/scripts/install +++ b/scripts/install @@ -13,8 +13,8 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -storage_quota="20gb" -ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota +#storage_quota="20gb" +#ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -45,13 +45,13 @@ pushd "$install_dir" ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd -#fingerprint=$(cat /etc/opt/simplex/fingerprint) -#ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint +fingerprint=$(cat /etc/opt/simplex/fingerprint) +ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint -#xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) -#ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint +xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) +ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint -#ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" +ynh_replace_string --match_string="port: 443" --replace_string="port: $port_xftp" --target_file="/etc/opt/simplex-xftp/file-server.ini" chown -R $app:$app "/etc/opt/simplex" chown -R $app:$app "/etc/opt/simplex-xftp" @@ -59,12 +59,12 @@ chown -R $app:$app "/etc/opt/simplex-xftp" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # SYSTEM CONFIGURATION @@ -87,13 +87,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" ynh_systemd_action --service_name="xftp" --action="start" --log_path="/var/log/$app/$app.log" - -fingerprint=$(cat /etc/opt/simplex/fingerprint) -ynh_app_setting_set --app=$app --key=fingerprint --value=$fingerprint - -xftp_fingerprint=$(cat /etc/opt/simplex-xftp/fingerprint) -ynh_app_setting_set --app=$app --key=xftp_fingerprint --value=$xftp_fingerprint - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7c65054..54ae51d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,10 +41,10 @@ ynh_systemd_action --service_name=xftp --action="stop" --log_path="/var/log/$app #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -if [ -z "${storage_quota:-}" ]; then - storage_quota="20gb" - ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota -fi +#if [ -z "${storage_quota:-}" ]; then +# storage_quota="20gb" +# ynh_app_setting_set --app=$app --key=storage_quota --value=$storage_quota +#fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE From bf8f491cca6c68fc7af7ebbe9d012ee219aad57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:03:34 +0200 Subject: [PATCH 36/46] fix --- config_panel.toml => config_panel.toml.example | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config_panel.toml => config_panel.toml.example (100%) diff --git a/config_panel.toml b/config_panel.toml.example similarity index 100% rename from config_panel.toml rename to config_panel.toml.example From dd61e64cddfa8c204da423d30ed78925d5e86714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:05:42 +0200 Subject: [PATCH 37/46] Update remove --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 4799f87..4d2c80a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -32,6 +32,7 @@ ynh_script_progression --message="Removing system configurations related to $app # Remove the dedicated systemd config ynh_remove_systemd_config +ynh_remove_systemd_config --service=xftp # Remove the app directory securely ynh_secure_remove --file="/etc/opt/simplex" From edbe7f71bcce31d0fccac29361e34d8fcb2681b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:13:44 +0200 Subject: [PATCH 38/46] fix --- conf/xftp.systemd.service | 2 +- scripts/install | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/xftp.systemd.service b/conf/xftp.systemd.service index 6b13866..744dd01 100644 --- a/conf/xftp.systemd.service +++ b/conf/xftp.systemd.service @@ -16,4 +16,4 @@ TimeoutStopSec=infinity AmbientCapabilities=CAP_NET_BIND_SERVICE [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index 249937f..3e2f086 100755 --- a/scripts/install +++ b/scripts/install @@ -25,8 +25,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" -mkdir -p /var/opt/simplex-xftp /etc/opt/simplex-xftp -chown -R $app:$app /var/opt/simplex-xftp /etc/opt/simplex-xftp +mkdir -p /var/opt/simplex-xftp /var/opt/simplex /etc/opt/simplex-xftp /etc/opt/simplex +chown -R $app:$app /var/opt/simplex-xftp /var/opt/simplex /etc/opt/simplex-xftp /etc/opt/simplex chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" From 8f304ddbd34e5ca8966f504ef9e1a13113e5d1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:34:10 +0200 Subject: [PATCH 39/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 3e2f086..67bc3f8 100755 --- a/scripts/install +++ b/scripts/install @@ -41,7 +41,7 @@ public_ip4="$(curl -s ip.yunohost.org)" || true ynh_app_setting_set --app=$app --key=public_ip4 --value=$public_ip4 pushd "$install_dir" - ./smp-server init --no-password --ip $public_ip4 -y + ./smp-server init --no-password --ip $public_ip4 --store-log --yes ./xftp-server init --ip $public_ip4 --quota '20gb' --store-log --path $data_dir popd From 22c17083a453e61593b0aebc9f557d0714bade25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:35:50 +0200 Subject: [PATCH 40/46] Update backup --- scripts/backup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 9fae3cc..336583e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,7 +21,11 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" -ynh_backup --src_path="/etc/opt/simplex" +ynh_secure_remove --file="/etc/opt/simplex" +ynh_secure_remove --file="/etc/opt/simplex-xftp" + +ynh_secure_remove --file="/var/opt/simplex" +ynh_secure_remove --file="/var/opt/simplex-xftp" #================================================= # BACKUP SYSTEMD From cb1e18a57f7cfccc502bbb22dd08b6953de50c04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 19:36:14 +0200 Subject: [PATCH 41/46] Update restore --- scripts/restore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index fcc6eb2..a87faaf 100755 --- a/scripts/restore +++ b/scripts/restore @@ -38,7 +38,12 @@ chown -R $app:www-data "$data_dir" ynh_script_progression --message="Restoring system configurations related to $app..." --weight=4 ynh_restore_file --origin_path="/etc/opt/simplex" -chown -R $app:$app "/etc/opt/simplex" +ynh_restore_file --origin_path="/etc/opt/simplex-xftp" + +ynh_restore_file --origin_path="/var/opt/simplex" +ynh_restore_file --origin_path="/var/opt/simplex-xftp" + +chown -R $app:$app /var/opt/simplex-xftp /var/opt/simplex /etc/opt/simplex-xftp /etc/opt/simplex ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet From 73ef481408d68e93ca963730a729db1ae9746060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 22:42:28 +0200 Subject: [PATCH 42/46] Update backup --- scripts/backup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index 336583e..92ad672 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,11 +21,11 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" -ynh_secure_remove --file="/etc/opt/simplex" -ynh_secure_remove --file="/etc/opt/simplex-xftp" +ynh_backup --src_path="/etc/opt/simplex" +ynh_backup --src_path="/etc/opt/simplex-xftp" -ynh_secure_remove --file="/var/opt/simplex" -ynh_secure_remove --file="/var/opt/simplex-xftp" +ynh_backup --src_path="/var/opt/simplex" +ynh_backup --src_path="/var/opt/simplex-xftp" #================================================= # BACKUP SYSTEMD From 776f69e5f3f2dbef2fff0d7595eb8ce1518fb0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 23 May 2023 22:48:57 +0200 Subject: [PATCH 43/46] Update upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 54ae51d..8836b1a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,12 +70,12 @@ chmod +x $install_dir/xftp-server #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" +#ynh_add_config --template="../conf/file-server.ini" --destination="/etc/opt/simplex-xftp/file-server.ini" -chmod 400 "/etc/opt/simplex-xftp/file-server.ini" -chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" +#chmod 400 "/etc/opt/simplex-xftp/file-server.ini" +#chown $app:$app "/etc/opt/simplex-xftp/file-server.ini" #================================================= # REAPPLY SYSTEM CONFIGURATIONS From 65838035e36648c10a932ce1d7875134b1d60662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 24 May 2023 10:55:49 +0200 Subject: [PATCH 44/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 52202f3..d557ed6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -13,7 +13,7 @@ maintainers = ["eric_G"] license = "AGPL-3.0" website = "https://simplex.chat/" admindoc = "https://github.com/simplex-chat/simplex-chat/blob/stable/docs/SERVER.md" -code = "https://github.com/simplex-chat/simplex-chat" +code = "https://github.com/simplex-chat/simplexmq" cpe = "cpe:2.3:a:simplex:simplex_chat" fund = "https://opencollective.com/simplex-chat" From c94d6dffebd4831e0bf7e1bc4937e2ff23255fc2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 24 May 2023 08:55:54 +0000 Subject: [PATCH 45/46] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6633016..8f329fd 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ SimpleX - the first messaging platform operating without user identifiers of any * Official app website: * Official admin documentation: -* Upstream app code repository: +* Upstream app code repository: * YunoHost documentation for this app: * Report a bug: diff --git a/README_fr.md b/README_fr.md index 91d9689..58db5e0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ SimpleX - la première plate-forme de messagerie qui n'a aucun identifiant d'uti * Site officiel de l’app : * Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : From ef5e5ff55b49df230215462da166ac52d7b9f44a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 24 May 2023 10:58:02 +0200 Subject: [PATCH 46/46] Update systemd.service --- conf/systemd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/systemd.service b/conf/systemd.service index 0db7783..2c11a46 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,6 @@ [Unit] Description=SimpleX: Messaging Protocol Server +Documentation=https://simplex.chat/docs/server.html After=network.target [Service]