small fixes
This commit is contained in:
parent
d9101e710f
commit
5b88781fe0
1 changed files with 2 additions and 2 deletions
4
main.py
Normal file → Executable file
4
main.py
Normal file → Executable file
|
@ -23,9 +23,9 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
|
|||
|
||||
client_hostname = socket.gethostname().split('.', 1)[0]
|
||||
|
||||
all_users = api_client.list("localemail/users")
|
||||
|
||||
def generate(api_client):
|
||||
all_users = api_client.list("localemail/users")
|
||||
# Création de l'environnement Jinja
|
||||
env = Environment(loader=FileSystemLoader('.'))
|
||||
template = env.get_template('templates/list')
|
||||
|
@ -42,7 +42,7 @@ def generate(api_client):
|
|||
fichier.write(aliases_rendered)
|
||||
fichier.close()
|
||||
|
||||
call(["newalias", "generated/aliases"]) # Update the aliases config file
|
||||
call(["/usr/bin/newaliases"]) # Update the aliases config file
|
||||
call(["postfix", "reload"]) # force the reloading now
|
||||
|
||||
for service in api_client.list("services/regen/"):
|
||||
|
|
Loading…
Reference in a new issue