123456789101112131415161718192021222324252627282930 |
- import typer
- import config
- from misc import apache_ldap, file_backup
- app = typer.Typer(help="Test test test", no_args_is_help=True)
- cfg = config.Config()
- @app.command()
- def gcstruct():
- """Generate a structure for the given configuration file"""
- file_backup.gcstruct_backup(cfg.portal_dir)
- @app.command()
- def ldap():
- cred = cfg.cognos11.credentials
- apache_ldap.ldap_backup(cred.username, cred.password, cfg.cognos11.config_dir + "\\apacheds_backup.ldif")
- @app.command()
- def deployment():
- file_backup.copy_deployment(cfg.cognos11.server_dir, cfg.portal_dir + "\\Content\\Deployment")
- if __name__ == "__main__":
- # app()
- # ldap_backup()
- deployment()
|