From 5811b539dbb0b54938753da11f8f5868b22600b8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 8 Oct 2023 10:38:13 +0000 Subject: [PATCH 1/5] Auto-update README --- README.md | 68 ++++++++++++---------------------------------------- README_fr.md | 64 +++++++++++++++---------------------------------- 2 files changed, 34 insertions(+), 98 deletions(-) diff --git a/README.md b/README.md index 8cf224e..87d80e1 100644 --- a/README.md +++ b/README.md @@ -1,85 +1,47 @@ -# Packaging an app, starting from this example - -* Copy this app before working on it, using the ['Use this template'](https://github.com/YunoHost/example_ynh/generate) button on the Github repo. -* Edit the `manifest.toml` with app specific info. -* Edit the `install`, `upgrade`, `remove`, `backup` and `restore` scripts, and any relevant conf files in `conf/`. - * Using the [script helpers documentation.](https://yunohost.org/packaging_apps_helpers) -* Edit the `change_url` and `config` scripts too, or remove them if you have no use of them -* Add a `LICENSE` file for the package. NB: this LICENSE file is not meant to necessarily be the LICENSE of the upstream app - it is only the LICENSE you want this package's code to published with ;). We recommend to use [the AGPL-3](https://www.gnu.org/licenses/agpl-3.0.txt). -* Edit `doc/DISCLAIMER*.md` -* The `README.md` files are to be automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator - ---- -# Example app for YunoHost +# PairDrop for YunoHost -[![Integration level](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Working status](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg) -[![Install Example app with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example) +[![Integration level](https://dash.yunohost.org/integration/pairdrop.svg)](https://dash.yunohost.org/appci/app/pairdrop) ![Working status](https://ci-apps.yunohost.org/ci/badges/pairdrop.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/pairdrop.maintain.svg) + +[![Install PairDrop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pairdrop) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Example app quickly and simply on a YunoHost server. +> *This package allows you to install PairDrop quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - -### Features - -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +This is a dummy description of this app features -**Shipped version:** 1.0~ynh1 - -**Demo:** https://demo.example.com +**Shipped version:** 1.8.2~ynh1 ## Screenshots -![Screenshot of Example app](./doc/screenshots/example.jpg) - -## Disclaimers / important information - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... - -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? +![Screenshot of PairDrop](./doc/screenshots/pairdrop_screenshot_desktop.png) ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost documentation for this app: -* Report a bug: +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/example_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/pairdrop_ynh/tree/testing). To try the testing branch, please proceed like that. ``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/pairdrop_ynh/tree/testing --debug or -sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app upgrade pairdrop -u https://github.com/YunoHost-Apps/pairdrop_ynh/tree/testing --debug ``` **More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 4da6fb7..e831239 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,71 +3,45 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# Exemple d'app pour YunoHost +# PairDrop pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg) -[![Installer Example app avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example) +[![Niveau d’intégration](https://dash.yunohost.org/integration/pairdrop.svg)](https://dash.yunohost.org/appci/app/pairdrop) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/pairdrop.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/pairdrop.maintain.svg) + +[![Installer PairDrop avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pairdrop) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Example app rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer PairDrop rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - -### Features - -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +Ceci est une fausse description des fonctionalités de l'app -**Version incluse :** 1.0~ynh1 +**Version incluse :** 1.8.2~ynh1 -**Démo :** https://demo.example.com +## Captures d’écran -## Captures d'écran - -![Capture d'écran de Example app](./doc/screenshots/example.jpg) - -## Avertissements / informations importantes - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... - -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? +![Capture d’écran de PairDrop](./doc/screenshots/pairdrop_screenshot_desktop.png) ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle utilisateur : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : -* Documentation YunoHost pour cette app : -* Signaler un bug : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : +* Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/example_ynh/tree/testing). +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/pairdrop_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. ``` bash -sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app install https://github.com/YunoHost-Apps/pairdrop_ynh/tree/testing --debug ou -sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug +sudo yunohost app upgrade pairdrop -u https://github.com/YunoHost-Apps/pairdrop_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 3e6f7063d51fcd3cf41b47ccee76f3445d41b2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 8 Oct 2023 12:43:50 +0200 Subject: [PATCH 2/5] fix --- conf/systemd.service | 2 +- doc/DESCRIPTION.md | 11 +++++++++- doc/DESCRIPTION_fr.md | 11 +++++++++- manifest.toml | 1 + scripts/backup | 51 ------------------------------------------- scripts/change_url | 10 ++------- scripts/install | 4 ++-- scripts/restore | 12 ++++++++-- scripts/upgrade | 14 +++++++++--- 9 files changed, 47 insertions(+), 69 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 59685f9..4559137 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=PairDrop +Description=PairDrop: local file sharing After=network.target [Service] diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 3f2e57a..d0c344f 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1,10 @@ -This is a dummy description of this app features +PairDrop is a sublime alternative to AirDrop that works on all platforms. + +### Features + +- File Sharing on your local network + - Send images, documents or text via peer to peer connection to devices on the same local network. +- Internet Transfers + - Join temporary public rooms to transfer files easily over the internet! +- Web-Application + - As it is web based, it runs on all devices. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 13f4b64..474a159 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1,10 @@ -Ceci est une fausse description des fonctionalités de l'app +PairDrop est une sublime alternative à AirDrop qui fonctionne sur toutes les plateformes. + +### Caractéristiques + +- Partage de fichiers sur votre réseau local + - Envoyez des images, des documents ou du texte via une connexion peer to peer vers des appareils sur le même réseau local. +- Transferts Internet + - Rejoignez des salles publiques temporaires pour transférer facilement des fichiers sur Internet ! +- Application Web + - Comme il est basé sur le Web, il fonctionne sur tous les appareils. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index 7556cd3..b269502 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,6 +14,7 @@ maintainers = ["eric_G"] [upstream] license = "AGPL-3.0-only" website = "https://pairdrop.net/" +demo = "https://pairdrop.net/" admindoc = "https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md" code = "https://github.com/schlagmichdoch/PairDrop" diff --git a/scripts/backup b/scripts/backup index 010f6c5..f8e82aa 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,75 +15,24 @@ source /usr/share/yunohost/helpers #================================================= ynh_print_info --message="Declaring files to be backed up..." -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fills the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls take basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= ynh_backup --src_path="$install_dir" -#================================================= -# BACKUP THE DATA DIR -#================================================= - -# Only relevant if there is a "data_dir" resource for this app -ynh_backup --src_path="$data_dir" --is_big - #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -#================================================= -# BACKUP FAIL2BAN CONFIGURATION -#================================================= - -ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" -ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" - -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup --src_path="/etc/logrotate.d/$app" - #================================================= # BACKUP SYSTEMD #================================================= ynh_backup --src_path="/etc/systemd/system/$app.service" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - -ynh_backup --src_path="/etc/cron.d/$app" - -ynh_backup --src_path="/etc/$app/" - -#================================================= -# BACKUP THE MYSQL DATABASE -#================================================= -ynh_print_info --message="Backing up the MySQL database..." - -### (However, things like MySQL dumps *do* take some time to run, though the -### copy of the generated dump to the archive still happens later) - -ynh_mysql_dump_db --database="$db_name" > db.sql - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/change_url b/scripts/change_url index f0964a6..3a9b28d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= 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=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -25,12 +25,6 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= - #================================================= # GENERIC FINALISATION #================================================= @@ -38,7 +32,7 @@ ynh_change_url_nginx_config #================================================= 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=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 4659657..8bea240 100755 --- a/scripts/install +++ b/scripts/install @@ -40,7 +40,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Local file sharing in your browser" --log="/var/log/$app/$app.log" #================================================= # BUILD YARN DEPENDENCIES @@ -72,7 +72,7 @@ chown $app:$app "$install_dir/rtc_config.json" 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=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 55ee0f9..7b915f0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,6 +10,14 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 + +# Install Nodejs +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -31,7 +39,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Local file sharing in your browser" --log="/var/log/$app/$app.log" #================================================= # GENERIC FINALIZATION @@ -41,7 +49,7 @@ yunohost service add $app --description="A short description of the app" --log=" ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 # Typically you only have either $app or php-fpm but not both at the same time... -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index ce47a5e..7076ecf 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= 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=$app --action="stop" --log_path="systemd" #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) @@ -34,6 +34,14 @@ fi chown -R $app:www-data "$install_dir" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=5 + +# Install Nodejs +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= @@ -43,7 +51,7 @@ ynh_add_nginx_config ynh_add_systemd_config -yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Local file sharing in your browser" --log="/var/log/$app/$app.log" #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) @@ -62,7 +70,7 @@ yunohost service add $app --description="A short description of the app" --log=" #================================================= 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=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT From cf9e02a42c7646421b0cf2e481420335a2c6510d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 8 Oct 2023 10:44:01 +0000 Subject: [PATCH 3/5] Auto-update README --- README.md | 13 ++++++++++++- README_fr.md | 12 +++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87d80e1..81d0ea1 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,22 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -This is a dummy description of this app features +PairDrop is a sublime alternative to AirDrop that works on all platforms. + +### Features + +- File Sharing on your local network + - Send images, documents or text via peer to peer connection to devices on the same local network. +- Internet Transfers + - Join temporary public rooms to transfer files easily over the internet! +- Web-Application + - As it is web based, it runs on all devices. **Shipped version:** 1.8.2~ynh1 +**Demo:** https://pairdrop.net/ + ## Screenshots ![Screenshot of PairDrop](./doc/screenshots/pairdrop_screenshot_desktop.png) diff --git a/README_fr.md b/README_fr.md index e831239..a1568e0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,11 +16,21 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Ceci est une fausse description des fonctionalités de l'app +PairDrop est une sublime alternative à AirDrop qui fonctionne sur toutes les plateformes. +### Caractéristiques + +- Partage de fichiers sur votre réseau local + - Envoyez des images, des documents ou du texte via une connexion peer to peer vers des appareils sur le même réseau local. +- Transferts Internet + - Rejoignez des salles publiques temporaires pour transférer facilement des fichiers sur Internet ! +- Application Web + - Comme il est basé sur le Web, il fonctionne sur tous les appareils. **Version incluse :** 1.8.2~ynh1 +**Démo :** https://pairdrop.net/ + ## Captures d’écran ![Capture d’écran de PairDrop](./doc/screenshots/pairdrop_screenshot_desktop.png) From 3d0be56bda62e223be3dac6dfcf7b1897b43fa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 8 Oct 2023 12:49:48 +0200 Subject: [PATCH 4/5] Update manifest.toml --- manifest.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/manifest.toml b/manifest.toml index b269502..0dcb723 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,6 +17,7 @@ website = "https://pairdrop.net/" demo = "https://pairdrop.net/" admindoc = "https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md" code = "https://github.com/schlagmichdoch/PairDrop" +fund = "https://www.buymeacoffee.com/pairdrop" [integration] yunohost = ">= 11.2" From f74cf32167a0f125a88784da8536a4c7bf7ecf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 8 Oct 2023 12:50:44 +0200 Subject: [PATCH 5/5] Update upgrade --- scripts/upgrade | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 7076ecf..26052c5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,6 +53,16 @@ ynh_add_systemd_config yunohost service add $app --description="Local file sharing in your browser" --log="/var/log/$app/$app.log" +#================================================= +# BUILD YARN DEPENDENCIES +#================================================= +ynh_script_progression --message="Building Yarn dependencies..." + +pushd "$install_dir" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install +popd + #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #=================================================