tis-remote-repo-conf
1-1
Package for configure an agent to sync wapt files of the server
2855 downloads

Description
- package : tis-remote-repo-conf
- version : 1-1
- architecture : all
- categories :
- maintainer : Evan BLAUDY
- description : Package for configure an agent to sync wapt files of the server
- 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 :
- editor :
- licence :
- signature_date : 2020-02-27T21:40:33.164492
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():
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():
pass