silent newaliases

This commit is contained in:
Charlie Jacomme 2018-08-09 16:43:55 +02:00
parent cbc360893b
commit f60349a52e

View file

@ -10,7 +10,7 @@ import requests
import base64 import base64
import json import json
from subprocess import call from subprocess import call
import os.path import os
import sys import sys
path =(os.path.dirname(os.path.abspath(__file__))) path =(os.path.dirname(os.path.abspath(__file__)))
@ -44,7 +44,7 @@ def generate(api_client):
fichier.write(aliases_rendered) fichier.write(aliases_rendered)
fichier.close() fichier.close()
call(["/usr/bin/newaliases"]) # Update the aliases config file call(["/usr/bin/newaliases"], stdout=open(os.devnull, 'wb')) # Update the aliases config file
call(["/usr/sbin/postfix", "reload"]) # force the reloading now call(["/usr/sbin/postfix", "reload"]) # force the reloading now
for arg in sys.argv: for arg in sys.argv: