tis-remote-repo-conf icon

Remote Repository Configuration

Paquet d'installation silencieuse pour Remote Repository Configuration

2-10
System and network
System and network

package           : tis-remote-repo-conf
version           : 2-10
architecture      : all
section           : base
priority          : optional
name              : Remote Repository Configuration
categories        : System and network
maintainer        : WAPT Team,Tranquil IT,Jimmy PELÉ
description       : Package for configure an agent to sync wapt files of the server
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : all
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Package pour configurer un agent pour synchroniser les fichiers wapt du serveur
description_pl    : Pakiet do konfiguracji agenta do synchronizacji plików wapt z serwera
description_de    : Paket zur Konfiguration eines Agenten für die Synchronisierung von wapt-Dateien des Servers
description_es    : Paquete para configurar un agente para sincronizar los archivos wapt del servidor
description_pt    : Pacote para configurar um agente para sincronizar ficheiros wapt do servidor
description_it    : Pacchetto per configurare un agente per sincronizzare i file wapt del server
description_nl    : Pakket voor het configureren van een agent om wapt-bestanden van de server te synchroniseren
description_ru    : Пакет для настройки агента для синхронизации wapt файлов сервера
audit_schedule    : 
editor            : Tranquil IT
keywords          : 
licence           : wapt_public
homepage          : https://www.wapt.fr/en/doc/wapt-replication/wapt-replicate-to-multiple-repositories/index.html
package_uuid      : ce6cfc25-c7f9-4b78-b403-18d23809698c
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 1da4f881264d5094b70bcef12c96b588cde497d5386dfdee2e2011021da82a21
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature         : td29kvs0c01mxMfqfrbgqzwwWNdTl7r/exyaDI2nQwTP188SjetrjTOvnQzyd5nJmlVfuUT5gzFl+W/dlLE6qiONNo7U1Xswf9f510im5pGy570rT87R+wHYP0I6MNfuQVXhx6moY+90l7VXixNxUp2P+d9G+1LV/7Ylvq4Yb1MS8ejwBpKQIHZRyxD1rj2VomNMcAko7Sy1HA3R0lUvbwF1j1wraZA+2Kfl7z9H35z1NgZBeVPfWupEcuamXluyAgYY/ExdIehxRSMDvc/nXbFAEOjfg5dVqZJn3ZFe6hsv+8Lz5bcAGmOrEhyGB/etE87JA/U5JahTr9QoHDJ/hg==
signature_date    : 2023-12-26T17:00:43.173352
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

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

"""
Please read the documentation.

Documentation (EN): https://www.wapt.fr/en/doc/wapt-replication.html
Documentation (FR): https://www.wapt.fr/fr/doc/wapt-replication.html

Parameters: https://www.wapt.fr/en/doc/wapt-replication.html#wapt-agent-configuration

Examples:

"enable_remote_repo": True,
# Active sync / Default value : False

"local_repo_path": None,
# Path where the sync is / Default value : "<wapt_path>/repository" / Example value : "/var/www/html/" for a linux

"local_repo_sync_task_period": None,
# Synchronization is started periodically so select a period / Default value : '10m' for 10 minutes / Example value : '1d' for one sync by day it's 's' for seconds,'m' for minutes,'h' for hours,'d' for day, 'w' for weeks

"local_repo_time_for_sync_start": None,
# Sync will start only after this hour of the day / Default value : None / Example value : '23:00' for sync to be done only after 11PM (it's in format : HH:MM)

"local_repo_time_for_sync_end": None,
# Sync will stop after this hour of the day / Default value : None if no 'local_repo_time_for_sync_start' configured else 'local_repo_time_for_sync_start' + 1 hour / Example value : '01:00' with previous example sync will be done every day only between 23PM and 01AM

"local_repo_limit_bandwidth": None,
# Limit for bandwidth to use for repo sync in Mbits/s / Default value : None / Example value :  0.5 for 0.5 Mbits/s (=500KBits/s)

"remote_repo_dirs": None,
# Select what do you want to sync in wapt packages ('wapt'), host packages ('wapt-host') or/and windows-updates ('waptwua') / Default value : "wapt,waptwua" / Example value : "wapt,waptwua,wapt-host"

"""


def install():
    # inifile_deletesection(WAPT.config_filename, "repo-sync") # UNCOMMENT = FORCE CONF

    # You can reset a parameter to its default value by setting it to None.
    conf = {
        "enable_remote_repo": True,
    }

    for akey in conf:
        if conf[akey] is not None:
            inifile_writestring(WAPT.config_filename, "repo-sync", akey, conf[akey])
        if conf[akey] is None:
            if inifile_hasoption(inifilename, "repo-sync", conf[akey]):
                inifile_deleteoption(inifilename, "repo-sync", conf[akey])

    print("Reloading WAPT configuration")
    WAPT.reload_config_if_updated()


def uninstall():
    # Delete synced files - UNCOMMENT IF NEEDED
    # remove_tree(
    #     inifile_readstring(WAPT.config_filename, "repo-sync", "local_repo_path") or makepath(WAPT.wapt_base_dir, "repository"), ignore_errors=True
    # )

    inifile_deletesection(WAPT.config_filename, "repo-sync")

    print("Reloading WAPT configuration")
    WAPT.reload_config_if_updated()

688241c5678ab788730c5afecd2b86be66286b80fbfa4262eed567943fc5c8d7 : setup.py
1da4f881264d5094b70bcef12c96b588cde497d5386dfdee2e2011021da82a21 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
63e6857a84bbe17645dfd6c280b2464745c5100b849f25cd2d7f65887582c66c : luti.json
e00f123e0d8fd2bad2bf2fc55d5e70b7e0ff8227d2bdb0368579204c04a55f0f : WAPT/control