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 #3 from YunoHost-Apps/testing

Testing
This commit is contained in:
eric_G 2023-11-01 16:05:59 +01:00 committed by GitHub
commit 64ce0a9562
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 38 additions and 64 deletions

View file

@ -3,15 +3,15 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app
It shall NOT be edited by hand.
-->
# Rustdesk server for YunoHost
# RustDesk Server for YunoHost
[![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)
[![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 Rustdesk server 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
@ -22,7 +22,7 @@ RustDesk is a full-featured open source remote control alternative for self-host
## Screenshots
![Screenshot of Rustdesk server](./doc/screenshots/screenshot.png)
![Screenshot of RustDesk Server](./doc/screenshots/screenshot.png)
## Documentation and resources

View file

@ -3,15 +3,15 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app
It shall NOT be edited by hand.
-->
# Rustdesk server pour YunoHost
# RustDesk Server pour YunoHost
[![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)
[![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 dinstaller Rustdesk server rapidement et simplement sur un serveur YunoHost.
> *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 densemble
@ -22,7 +22,7 @@ RustDesk est une alternative de contrôle à distance open source complète pour
## Captures décran
![Capture décran de Rustdesk server](./doc/screenshots/screenshot.png)
![Capture décran de RustDesk Server](./doc/screenshots/screenshot.png)
## Documentations et ressources

View file

@ -1 +0,0 @@
PORT=__PORT__

6
doc/ADMIN.md Normal file
View file

@ -0,0 +1,6 @@
Credentials to use in Settings -> Network
ID Server: __DOMAIN__
Relay Server: __DOMAIN__
API Server: https://__DOMAIN__
key: __KEY__

6
doc/ADMIN_fr.md Normal file
View file

@ -0,0 +1,6 @@
Informations d'identification à utiliser dans Paramètres -> Réseau
Serveur ID : __DOMAIN__
Serveur relais : __DOMAIN__
Serveur API : https://__DOMAIN__
Key : __KEY__

View file

@ -3,7 +3,7 @@
packaging_format = 2
id = "rustdesk-server"
name = "Rustdesk server"
name = "RustDesk Server"
description.en = "Remote control alternative for self-hosting"
description.fr = "Alternative de contrôle à distance pour l'auto-hébergement"
@ -22,9 +22,9 @@ yunohost = ">= 11.2"
architectures = "all"
multi_instance = false
ldap = false
ldap = "not_relevant"
sso = false
sso = "not_relevant"
disk = "50M"
ram.build = "50M"
@ -59,6 +59,7 @@ ram.runtime = "50M"
main.url = "/"
[resources.ports]
api.default = 21114
hbbs.default = 21115
hbbs.exposed = "TCP"
hbbsbis.default = 21116
@ -69,3 +70,6 @@ ram.runtime = "50M"
hbbr.exposed = "TCP"
hbbrbis.default = 21119
hbbrbis.exposed = "TCP"
[resources.apt]
packages = "sqlite3"

View file

@ -21,12 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP LOGROTATE
#=================================================

View file

@ -24,7 +24,7 @@ ynh_systemd_action --service_name=rustdesksignal --action="stop" --log_path="sys
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
#ynh_change_url_nginx_config
#=================================================
# GENERIC FINALISATION

View file

@ -29,9 +29,6 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config using the conf/nginx.conf template
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config --service=rustdeskrelay --template=rustdeskrelay.service
ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.service
@ -39,11 +36,6 @@ ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.servic
yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log"
yunohost service add rustdesksignal --description="Rustdesk Signal Server" --log="/var/log/$app/$app.log"
#=================================================
# HANDLE LOG FILES AND LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
@ -52,18 +44,6 @@ chown $app -R /var/log/$app
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# APP INITIAL CONFIGURATION
#=================================================
# ADD A CONFIGURATION
#=================================================
#ynh_script_progression --message="Adding a configuration file..." --weight=1
#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"
#=================================================
# GENERIC FINALIZATION
#=================================================
@ -75,6 +55,8 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=rustdeskrelay --action="start" --log_path="systemd"
ynh_systemd_action --service_name=rustdesksignal --action="start" --log_path="systemd"
key=$(cat "$install_dir/id_ed25519.pub")
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -31,8 +31,6 @@ fi
ynh_remove_systemd_config --service=rustdeskrelay
ynh_remove_systemd_config --service=rustdesksignal
ynh_remove_nginx_config
# Remove the app-specific logrotate config
ynh_remove_logrotate

View file

@ -29,21 +29,17 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/rustdeskrelay.service"
systemctl enable rustdeskrelay.service --quiet
ynh_restore_file --origin_path="/etc/systemd/system/rustdesksignal.service"
systemctl enable rustdesksignal.service --quiet
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
chown $app -R /var/log/$app
ynh_restore_file --origin_path="/etc/systemd/system/$rustdeskrelay.service"
systemctl enable $rustdeskrelay.service --quiet
ynh_restore_file --origin_path="/etc/systemd/system/$ --description="Rustdesk Signal Server" --log="/var/log/$app/$app.log"
.service"
systemctl enable $ --description="Rustdesk Signal Server" --log="/var/log/$app/$app.log"
.service --quiet
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log"

View file

@ -43,8 +43,6 @@ chmod +x "$install_dir/hbbs"
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config --service=rustdeskrelay --template=rustdeskrelay.service
ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.service
@ -52,18 +50,6 @@ ynh_add_systemd_config --service=rustdesksignal --template=rustdesksignal.servic
yunohost service add rustdeskrelay --description="Rustdesk Relay Server" --log="/var/log/$app/$app.log"
yunohost service add rustdesksignal --description="Rustdesk Signal Server" --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_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"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -7,3 +7,6 @@ test_format = 1.0
# ------------
# Tests to run
# ------------
#exclude = ["change_url", "install.nourl"]