1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rustdesk-server_ynh.git synced 2024-09-03 20:16:24 +02:00

Merge pull request #1 from YunoHost-Apps/testing

Update rustdesk-server.service
This commit is contained in:
eric_G 2023-11-01 07:35:44 +01:00 committed by GitHub
commit c9ca8c9dfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 72 additions and 137 deletions

View file

@ -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
---
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# 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: <https://example.com>
* Official user documentation: <https://yunohost.org/apps>
* Official admin documentation: <https://yunohost.org/packaging_apps>
* Upstream app code repository: <https://some.forge.com/example/example>
* YunoHost documentation for this app: <https://yunohost.org/app_example>
* Report a bug: <https://github.com/YunoHost-Apps/example_ynh/issues>
* Official app website: <https://rustdesk.com/>
* Official admin documentation: <https://rustdesk.com/docs/en/>
* Upstream app code repository: <https://github.com/rustdesk/rustdesk-server>
* YunoHost Store: <https://apps.yunohost.org/app/rustdesk-server>
* Report a bug: <https://github.com/YunoHost-Apps/rustdesk-server_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

View file

@ -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 dinté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 dinstaller Rustdesk server rapidement et simplement sur un serveur YunoHost.
Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
## Vue d'ensemble
## Vue densemble
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 : <https://example.com>
* Documentation officielle utilisateur : <https://yunohost.org/apps>
* Documentation officielle de l'admin : <https://yunohost.org/packaging_apps>
* Dépôt de code officiel de l'app : <https://some.forge.com/example/example>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_example>
* Signaler un bug : <https://github.com/YunoHost-Apps/example_ynh/issues>
* Site officiel de lapp : <https://rustdesk.com/>
* Documentation officielle de ladmin : <https://rustdesk.com/docs/en/>
* Dépôt de code officiel de lapp : <https://github.com/rustdesk/rustdesk-server>
* YunoHost Store: <https://apps.yunohost.org/app/rustdesk-server>
* Signaler un bug : <https://github.com/YunoHost-Apps/rustdesk-server_ynh/issues>
## 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 :** <https://yunohost.org/packaging_apps>
**Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>

View file

@ -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__/;
}
proxy_pass http://127.0.0.1:__PORT_HBBS__/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}

View file

@ -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

View file

@ -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

0
conf/rustdesk.yml Normal file
View file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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