tis-remote-repo-conf

1.1-6
Package for configure an agent to sync wapt files of the server
2855 downloads
Download
default icon

  Description 

  • package : tis-remote-repo-conf
  • version : 1.1-6
  • architecture : all
  • categories : System and network
  • maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ,Evan BLAUDY
  • description : Package for configure an agent to sync wapt files of the server
  • locale :
  • target_os :
  • min_wapt_version : 1.8
  • sources :
  • installed_size :
  • impacted_process :
  • description_fr :
  • description_pl :
  • description_de :
  • description_es :
  • description_pt :
  • description_it :
  • description_nl :
  • description_ru :
  • editor : Tranquil IT
  • licence :
  • signature_date : 2020-07-17T15:01:55.821206
  • Homepage : https://www.wapt.fr/en/doc/wapt-replication/wapt-replicate-to-multiple-repositories/index.html

  Setup.py 

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

uninstallkey = []

# PLEASE READ THE DOCUMENTATION BEFORE

# FRENCH DOCUMENTATION : https://www.wapt.fr/fr/doc/wapt-replication/wapt-replicate-to-multiple-repositories/index.html

# INTERNATIONAL DOCUMENTATION : https://www.wapt.fr/en/doc/wapt-replication/wapt-replicate-to-multiple-repositories/index.html

# CHANGE ONLY VALUES IN THE CONF DICT


def install():
    # Defining variables
    wapt_enterprise_dir = makepath(WAPT.wapt_base_dir,'waptenterprise')

    # Checking that the WAPT Agent is well in Enterprise version
    if isdir(wapt_enterprise_dir):
        print('Continuing: WAPT Agent is well installed in Enterprise version')
    else:
        error('WAPT Agent is NOT installed in Enterprise version, please upgrade')

    conf = {
    '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"
    }

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

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


def uninstall():
    # delete synced files uncomment if you want
    #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')


def update_package():
    # Initializing variables
    version = control.version.split('-')[0]

    # Changing version of the package
    control.version = '%s-%s'%(version,int(control.version.split('-')[-1])+1)
    control.save_control_to_wapt()
    print('Changing version to: %s in WAPT\\control' % control.version)




										

  Changelog 



No changelog.txt.
									
  manifest.sha256