diff --git a/README.md b/README.md index 8cf224e..d21e4ea 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 +# Rustdesk server 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/rustdesk-server.svg)](https://dash.yunohost.org/appci/app/rustdesk-server) ![Working status](https://ci-apps.yunohost.org/ci/badges/rustdesk-server.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/rustdesk-server.maintain.svg) + +[![Install Rustdesk server with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=rustdesk-server) *[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 Rustdesk server 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. +RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration. -### 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." - - -**Shipped version:** 1.0~ynh1 - -**Demo:** https://demo.example.com +**Shipped version:** 1.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 Rustdesk server](./doc/screenshots/screenshot.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: +* YunoHost Store: +* 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/rustdesk-server_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/rustdesk-server_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 rustdesk-server -u https://github.com/YunoHost-Apps/rustdesk-server_ynh/tree/testing --debug ``` **More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 4da6fb7..434505e 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 +# Rustdesk server 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/rustdesk-server.svg)](https://dash.yunohost.org/appci/app/rustdesk-server) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/rustdesk-server.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/rustdesk-server.maintain.svg) + +[![Installer Rustdesk server avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=rustdesk-server) *[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 Rustdesk server 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. +RustDesk est une alternative de contrôle à distance open source complète pour l'auto-hébergement et la sécurité avec une configuration minimale. -### Features +**Version incluse :** 1.1.8-2~ynh1 -- 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." +## Captures d’écran - -**Version incluse :** 1.0~ynh1 - -**Démo :** https://demo.example.com - -## 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 Rustdesk server](./doc/screenshots/screenshot.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 : +* YunoHost Store: +* 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/rustdesk-server_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/rustdesk-server_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 rustdesk-server -u https://github.com/YunoHost-Apps/rustdesk-server_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 diff --git a/conf/nginx.conf b/conf/nginx.conf index 67fc2b3..5326161 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,8 +1,7 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - proxy_pass http://127.0.0.1:__PORT_HBBS__/; -} \ No newline at end of file + proxy_pass http://127.0.0.1:__PORT_HBBS__/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } \ No newline at end of file diff --git a/conf/rustdesk-hbbs.service b/conf/rustdesk-hbbs.service index f37ffa0..77f7252 100644 --- a/conf/rustdesk-hbbs.service +++ b/conf/rustdesk-hbbs.service @@ -8,9 +8,9 @@ Group=__APP__ Restart=always LimitNOFILE=1000000 WorkingDirectory=__INSTALL_DIR__/ -ExecStart=__INSTALL_DIR__/hbbs -r 127.0.0.1:__PORT_HBBS__ -StandardOutput=append:__INSTALL_DIR__/hbbs.log -StandardError=append:__INSTALL_DIR__/hbbs.error +ExecStart=__INSTALL_DIR__/hbbs -r 127.0.0.1 -p __PORT_HBBS__ +#StandardOutput=append:__INSTALL_DIR__/hbbs.log +#StandardError=append:__INSTALL_DIR__/hbbs.error # Restart service after 10 seconds if node service crashes RestartSec=10 diff --git a/conf/rustdesk-server.service b/conf/rustdesk-server.service index 0cb3c7a..d5605c2 100644 --- a/conf/rustdesk-server.service +++ b/conf/rustdesk-server.service @@ -3,14 +3,14 @@ Description=Rustdesk Relay Server [Service] Type=simple -LimitNOFILE=1000000 -ExecStart=rustdesk-server/hbbr -WorkingDirectory=rustdesk-server/ User=__APP__ Group=__APP__ +LimitNOFILE=1000000 +ExecStart=__INSTALL_DIR__/hbbr -p __PORT_HBBR__ +WorkingDirectory=__INSTALL_DIR__/ Restart=always -StandardOutput=append:rustdesk-server/hbbr.log -StandardError=append:rustdesk-server/hbbr.error +#StandardOutput=append:rustdesk-server/hbbr.log +#StandardError=append:rustdesk-server/hbbr.error # Restart service after 10 seconds if node service crashes RestartSec=10 diff --git a/conf/rustdesk.yml b/conf/rustdesk.yml new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png index fb24422..2dddde1 100644 Binary files a/doc/screenshots/screenshot.png and b/doc/screenshots/screenshot.png differ diff --git a/manifest.toml b/manifest.toml index 96a222e..341fd80 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,14 +7,14 @@ name = "Rustdesk server" description.en = "Remote control alternative for self-hosting" description.fr = "Alternative de contrôle à distance pour l'auto-hébergement" -version = "1.0~ynh1" +version = "1.1.8-2~ynh1" maintainers = ["eric_G"] [upstream] license = "AGPL-3.0" website = "https://rustdesk.com/" -admindoc = "https://yunohost.org/packaging_apps" +admindoc = "https://rustdesk.com/docs/en/" code = "https://github.com/rustdesk/rustdesk-server" [integration] @@ -43,8 +43,6 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - in_subdir = true - extract = false amd64.url = "https://github.com/rustdesk/rustdesk-server/releases/download/1.1.8-2/rustdesk-server-linux-amd64.zip" amd64.sha256 = "3cf2790c3e9ef70c0eb9ffae02cbe3a2efad71621efda376450e7be3209f2b1c" arm64.url = "https://github.com/rustdesk/rustdesk-server/releases/download/1.1.8-2/rustdesk-server-linux-arm64v8.zip" @@ -63,7 +61,7 @@ ram.runtime = "50M" [resources.ports] main.default = 21115 main.exposed = "TCP" - hbbs.main = 21116 + hbbs.default = 21116 hbbs.exposed = "Both" - hbbr.main = 21117 + hbbr.default = 21117 hbbr.exposed = "TCP" diff --git a/scripts/change_url b/scripts/change_url index 31da587..e4a574c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,8 +16,8 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=rustdesk-server --action="stop" --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=rustdesk-hbbs --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=rustdesk-server --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=rustdesk-hbbs --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -33,8 +33,8 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="systemd" +ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index f761a70..5ce2b8b 100755 --- a/scripts/install +++ b/scripts/install @@ -20,8 +20,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" chown -R $app:www-data "$install_dir" -#chmod +x "$install_dir/hbbr" -#chmod +x "$install_dir/hbbs" +chmod +x "$install_dir/hbbr" +chmod +x "$install_dir/hbbs" #================================================= # SYSTEM CONFIGURATION @@ -35,8 +35,8 @@ ynh_add_nginx_config ynh_add_systemd_config --service=rustdesk-server --template=rustdesk-server.service ynh_add_systemd_config --service=rustdesk-hbbs --template=rustdesk-hbbs.service -yunohost service add rustdesk-server --description="A short description of the app" --log="/var/log/$app/$app.log" -yunohost service add rustdesk-hbbs --description="A short description of the app" --log="/var/log/$app/$app.log" +yunohost service add rustdesk-server --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" +yunohost service add rustdesk-hbbs --description="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" #================================================= # APP INITIAL CONFIGURATION @@ -58,8 +58,8 @@ yunohost service add rustdesk-hbbs --description="A short description of the app ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="/var/log/$app/$app.log" -ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=rustdesk-server --action="start" --log_path="systemd" +ynh_systemd_action --service_name=rustdesk-hbbs --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 55ee0f9..a3aa7b5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -31,7 +31,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="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" #================================================= # GENERIC FINALIZATION @@ -41,7 +41,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 6dcf901..e9030fc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,6 +33,8 @@ then fi chown -R $app:www-data "$install_dir" +chmod +x "$install_dir/hbbr" +chmod +x "$install_dir/hbbs" #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -43,26 +45,26 @@ 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="Remote control alternative for self-hosting" --log="/var/log/$app/$app.log" #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 +#ynh_script_progression --message="Updating a configuration file..." --weight=1 -ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" -chmod 400 "$install_dir/some_config_file" -chown $app:$app "$install_dir/some_config_file" +#chmod 400 "$install_dir/some_config_file" +#chown $app:$app "$install_dir/some_config_file" #================================================= # START SYSTEMD SERVICE #================================================= 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/tests.toml.example b/tests.toml similarity index 100% rename from tests.toml.example rename to tests.toml