tis-remote-repo-tftp

2.6.0.17293-1
Paquet pour l'installation de WaptTFTPServer pour les agents de dépôts distants
4833 téléchargements
Télécharger
Voir le résultat de la construction Voir l'analyse de VirusTotal
tis-remote-repo-tftp icon
  • package : tis-remote-repo-tftp
  • name : Remote Repository TFTP
  • version : 2.6.0.17293-1
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Ingrid TALBOT
  • editor :
  • licence :
  • locale : all
  • target_os : windows
  • impacted_process :
  • architecture : x64
  • signature_date : 2025-06-09 17:11
  • size : 940.73 Ko
  • homepage : https://www.wapt.fr/en/doc/wapt-wads
package           : tis-remote-repo-tftp
version           : 2.6.0.17293-1
architecture      : x64
section           : base
priority          : optional
name              : Remote Repository TFTP
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ,Ingrid TALBOT
description       : Package for installing WaptTFTPServer for remote repositories agents
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : windows
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Paquet pour l'installation de WaptTFTPServer pour les agents de dépôts distants
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : tftp,wapt
licence           : 
homepage          : https://www.wapt.fr/en/doc/wapt-wads
package_uuid      : d3740996-0918-401a-a6a5-5252bc089de9
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 29f1849f2f6845086ee6dd95bcaeae5cb0438ab7435b1af6d30d57f520a5cfe3
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-06-09T17:11:31.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         : GvN07FPM3J0GHV+5KMfN0LrLjM6SYff3AbUQ/yn8NiqMRsh5MAQmmsQyVIM++bpQ57JLly3XyBt/BHvCfK+pMSICxA15ICovfvOm4gBlo4rfaDtLTQX+pn877/exJSpEciPd+UAT9nGM7zJCyzY8XkciCISt/+tYYGEF7V7qhsUmntS/b7HfhPgiuXPAmgWBCFwlrgDSXjMIzFXwaiN0k+2NEahL5kFl/4HO9jbI6Rrkb5AlieOvRJCmk9JYnPSvHWPXPzmuB6e0lh2D/RPZ75wWttBwmumUxBf5ewj64bmX1dv9wxcjrXm45sxyCJq/rRAgSCDP8zH9nKCHccXUzw==
# -*- coding: utf-8 -*-

from setuphelpers import *

bin_name = "wapttftpserver.exe"
service_name = "WaptTFTPServer"


def install():
    tftp_bin = os.path.join(WAPT.wapt_base_dir, bin_name)
    if service_installed(service_name):
        uninstall()
    killalltasks(bin_name)
    filecopyto(bin_name, tftp_bin)

    print("Apply WaptTFTPServer config")
    repo_path = inifile_readstring(WAPT.config_filename, "repo-sync", "local_repo_path") or makepath(WAPT.wapt_base_dir, "repository")
    tftp_path = makepath(repo_path, "wads", "pxe")
    mkdirs(tftp_path)
    server_conf_dir = makepath(WAPT.wapt_base_dir, "conf")
    server_ini = makepath(server_conf_dir, "waptserver.ini")
    mkdirs(server_conf_dir)
    inifile_writestring(server_ini, "tftpserver", "service_name", service_name)
    inifile_writestring(server_ini, "tftpserver", "root_dir", tftp_path)

    print("Add WaptTFTPServer firewall rule")
    run(f'netsh advfirewall firewall add rule name="{service_name}" dir=in action=allow program="{tftp_bin}" enable=yes')

    print("Create WaptTFTPServer service")
    if not service_installed(service_name):
        # run(rf'"{tftp_bin}" /install --service_name={service_name} --root_dir="{tftp_path}"')
        print(run(rf'"{tftp_bin}" /install'))
    if not service_is_running(service_name):
        service_start(service_name)


def uninstall():
    tftp_bin = os.path.join(WAPT.wapt_base_dir, bin_name)
    server_conf_dir = makepath(WAPT.wapt_base_dir, "conf")

    print("Remove WaptTFTPServer service")
    if service_installed(service_name):
        if service_is_running(service_name):
            service_stop(service_name)
        print(run(rf'"{tftp_bin}" /uninstall'))

    print("Remove WaptTFTPServer firewall rule")
    run(f'netsh advfirewall firewall delete rule name="{service_name}" program="{tftp_bin}"')

    remove_file(tftp_bin)
    if len(glob.glob(server_conf_dir + os.sep + "*")) <= 1:
        remove_tree(server_conf_dir)
from setuphelpers import *


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    download_url = "https://wapt.tranquil.it/wapt/releases/latest/bin/win64/wapttftpserver.exe"
    latest_bin = download_url.split("/")[-1]

    # Deleting binaries
    for f in glob.glob("*.exe") + glob.glob("*.msi"):
        print("Removing: %s" % f)
        remove_file(f)

    # Downloading latest binaries
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)

    # Changing version of the package
    version = get_version_from_binary(latest_bin, "FileVersion")
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

    # Validating or not update-package-sources
    return package_updated
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
01d4f1a3f31a40d79d33ba80625b97bd7301eb89656a2485f10db136478f1f56 : WAPT/control
29f1849f2f6845086ee6dd95bcaeae5cb0438ab7435b1af6d30d57f520a5cfe3 : WAPT/icon.png
3283ede5bc6a4a11874927f2741ec05b3175716ad8e1dd9b70c1a6a89706150b : luti.json
f60bb92b3d52244aee49f3c2f55088ca7d2c31026e36f5beb2a6c65a1e86053f : setup.py
27d1c4fab224fdf66f728ab34aa7636dfd7fb5cab01c009f0613731e48e7c256 : update_package.py
c7ed978dbc7e6638f685fb4b14763f967def48627c2ee8d6a4bd26a8d76f1913 : wapttftpserver.exe