tis-rustdesk-server

1.1.13-11
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
2238 téléchargements
Télécharger
Voir le résultat de la construction Voir l'analyse de VirusTotal
tis-rustdesk-server icon
  • package : tis-rustdesk-server
  • name : RustDesk Server
  • version : 1.1.13-11
  • categories : Utilities
  • maintainer : WAPT Team,Tranquil IT,Amel FRADJ
  • editor :
  • licence : opensource_free
  • locale : all
  • target_os : linux
  • impacted_process :
  • architecture : arm
  • signature_date : 2025-01-25 19:00
  • size : 5.30 Mo
  • homepage : https://rustdesk.com/
package           : tis-rustdesk-server
version           : 1.1.13-11
architecture      : arm
section           : base
priority          : optional
name              : RustDesk Server
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT,Amel FRADJ
description       : RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : linux
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : 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
description_pl    : RustDesk to w pełni funkcjonalna alternatywa zdalnego sterowania typu open source do samodzielnego hostingu i bezpieczeństwa przy minimalnej konfiguracji
description_de    : RustDesk ist eine voll funktionsfähige Open-Source-Fernsteuerungsalternative für Selbst-Hosting und Sicherheit mit minimaler Konfiguration
description_es    : RustDesk es una completa alternativa de control remoto de código abierto para el autoalojamiento y la seguridad con una configuración mínima
description_pt    : O RustDesk é uma alternativa de controlo remoto de código aberto com todas as funcionalidades para auto-hospedagem e segurança com configuração mínima
description_it    : RustDesk è un'alternativa di controllo remoto open source completa per l'auto-hosting e la sicurezza con una configurazione minima
description_nl    : RustDesk is een volledig open source alternatief voor afstandsbediening voor zelfbeheer en beveiliging met minimale configuratie
description_ru    : RustDesk - это полнофункциональная альтернатива удаленного управления с открытым исходным кодом для самостоятельного размещения и обеспечения безопасности с минимальной конфигурацией
audit_schedule    : 
editor            : 
keywords          : RustDesk
licence           : opensource_free
homepage          : https://rustdesk.com/
package_uuid      : 43d05399-f889-427a-892b-dc55a892fcf4
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : https://github.com/rustdesk/rustdesk/releases
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 6e1b5881cfd9d438d6aff2c4f9c3f845a728072c75a61d637b842c95b6322a8c
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-01-25T19:00:11.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : W33oZavrOX72wzZ7u5pUTTyntGneRjtVEobFeajsXYLf9km9pKOk9HwzF3P0cj2uLw+aUSHacBTkXLZOVL7hPFCUR+t32eX2GcOKny7k05gr0zTm7QnZOa0fWuktOVXZmOoKSMTceau2kIn4FT6LXJTvqXxOQ+6/iGRes6KZ+87mhWel1/jakhvGFztL7HNVC5cYkPpo7E/o27f2ROrJQw53M7ZB5HVFx5nXjr/W6crwVzSFyVHNlzlbo7fgPPab6OstdFGJjK0QZ08JK4RZBcdvUg6/NWCCL4NkyaA6ZxsuoLzir1tu+vhFdIdp5VpvNuGmrbi/YqtcFOIr/68h7Q==
# -*- coding: utf-8 -*-
from setuphelpers import *
import time
import glob
import json
import base64
import time
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls

apiurl = ''

def install():

    bin_name = glob.glob("*.zip")[0]
    namezip = bin_name.replace('.zip','')
    arch = namezip.split('-')[-1].split('.zip')[0]
    unzip(bin_name)

    copytree2(makepath(namezip,arch),'/opt/rustdesk')

    run('chmod +x /opt/rustdesk/hbbs')
    run('chmod +x /opt/rustdesk/hbbr')

    if type_redhat():
        if 'SELinux status:                 enabled' in run('sestatus'):
            run('restorecon -irv /opt/rustdesk/*')

    mkdirs('/var/log/rustdesk')

    with open('/etc/systemd/system/rustdesksignal.service','w') as f:
        f.write("""[Unit]
Description=Rustdesk Signal Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/opt/rustdesk/hbbs
WorkingDirectory=/opt/rustdesk/
User=root
Group=root
Restart=always
StandardOutput=append:/var/log/rustdesk/signalserver.log
StandardError=append:/var/log/rustdesk/signalserver.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target""")

    run('systemctl daemon-reload')
    run('systemctl enable rustdesksignal.service')
    run('systemctl start rustdesksignal.service')

    with open('/etc/systemd/system/rustdeskrelay.service','w') as f:
        f.write("""[Unit]
Description=Rustdesk Relay Server
[Service]
Type=simple
LimitNOFILE=1000000
ExecStart=/opt/rustdesk/hbbr
WorkingDirectory=/opt/rustdesk/
User=root
Group=root
Restart=always
StandardOutput=append:/var/log/rustdesk/relayserver.log
StandardError=append:/var/log/rustdesk/relayserver.error
# Restart service after 10 seconds if node service crashes
RestartSec=10
[Install]
WantedBy=multi-user.target""")

    run('systemctl daemon-reload')
    run('systemctl enable rustdeskrelay.service')
    run('systemctl start rustdeskrelay.service')


def audit():

    hostname = open('/etc/hostname','r').read().strip('\n')
    nb=0
    while not glob.glob('/opt/rustdesk/*.pub'):
        nb=nb+1
        if nb == 120:
            error("'/opt/rustdesk/*.pub not found")
        time.sleep(1)

    pubkey = glob.glob('/opt/rustdesk/*.pub')[0]

    key = open(pubkey,'r').read()



    if not '.' in hostname:
        if not params.get("install_with_luti", False):
            error('please configure fqdn in /etc/hostname')

    print('fqdn use is %s' % hostname)

    config = {"host":hostname,"relay":hostname,"key":key,"api":apiurl}
    rustdesk_list = list(base64.b64encode(json.dumps(config,separators=(',', ':')).encode('utf-8')).decode('utf-8').replace('=',''))
    rustdesk_list.reverse()
    rustdesk_cfg = ''.join(rustdesk_list)

    data = {"config" : config, "rustdesk_cfg" : rustdesk_cfg}


    WAPT.write_audit_data_if_changed("rustdesk-server", 'rustdesk-server', data, max_count=365)
    return "OK"



# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import glob


def update_package():
    # Declaration of local variables
    package_updated = False
    proxies = get_proxies_from_wapt_console()
    if not proxies:
        proxies = get_proxies()
    api_url = "https://api.github.com/repos/rustdesk/rustdesk-server/releases/latest"



    # Get data from API
    releases_dict = wgets(api_url, proxies=proxies, as_json=True)
    exe_found = False  # Flag pour indiquer la découverte d'un fichier .msi
    for release in releases_dict:
        if exe_found:
            break
        for asset in releases_dict["assets"]:
            if "armv7" in asset["browser_download_url"] and asset["browser_download_url"].endswith('.zip'):
                url_download = asset["browser_download_url"]
                filename = url_download.split("/")[-1]
                last_version = releases_dict["name"].replace("-",".")
                exe_found = True  # Mettre à jour le flag pour indiquer qu'un .exe a été trouvé
                break

    if not isfile(filename):
        package_updated = True
        wget(url_download, filename, proxies=proxies)

    # nettoyer les fichiers temporaires
    for f in glob.glob("*.zip"):
        if f != filename:
            remove_file(f)

    control.set_software_version(last_version)
    control.save_control_to_wapt()

    return package_updated
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
fcf599baa543c6dc30ecb959443544ecd2682e8d28870d4362d237ccbc65e86d : WAPT/control
6e1b5881cfd9d438d6aff2c4f9c3f845a728072c75a61d637b842c95b6322a8c : WAPT/icon.png
1452ee7141c28d8b1ca218b3e66f065cf4311df291d480b0caa91032eccedb7c : luti.json
33589c5934a6db4d26abb3484d7e25094416b5687f98ae3335e9f12e132455cb : rustdesk-server-linux-armv7.zip
fe319d82ebcb34add1ccd1e7d1026ddfadf9c49628c875b411981ebad2a8d371 : setup.py
8223e4878ac7be7daa4177e47ade2b4bdc7be59de4caeadca1432d15aabd11df : update_package.py