corrections
This commit is contained in:
parent
66b42612f9
commit
93fd0536f1
@ -10,7 +10,7 @@ from collections import OrderedDict
|
||||
|
||||
def display_help():
|
||||
print("Modification de la valeur d'une variable d'un serveur")
|
||||
print("{} [--var nom_variable --value valeur]".format(sys.argv[0]))
|
||||
print("{} [--r realm --d domain]".format(sys.argv[0]))
|
||||
|
||||
|
||||
def argparser():
|
||||
@ -55,12 +55,12 @@ def main():
|
||||
fh.write(cjson.encode(store))
|
||||
fh.close()
|
||||
|
||||
cmd="""CreoleCat samba4-vars.conf"""
|
||||
cmd="""CreoleCat -t samba4-vars.conf"""
|
||||
output = os.popen(cmd)
|
||||
res = output.read().strip()
|
||||
output.close()
|
||||
|
||||
cmd="""/usr/share/eole/posttemplate/25-manage-samba instance"""
|
||||
cmd="""/usr/share/eole/postservice/25-manage-samba instance"""
|
||||
output = os.popen(cmd)
|
||||
res = output.read().strip()
|
||||
output.close()
|
||||
|
@ -51,9 +51,11 @@ def main():
|
||||
if varc in store:
|
||||
store[varc]['val'] = valvar
|
||||
|
||||
fh = open("/etc/eole/config.eol", 'w')
|
||||
fh.write(cjson.encode(store))
|
||||
fh.close()
|
||||
fh = open("/etc/eole/config.eol", 'w')
|
||||
fh.write(cjson.encode(store))
|
||||
fh.close()
|
||||
else:
|
||||
print_orange('Erreur : variable {} inconnue'.format(varc))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -40,7 +40,7 @@ def argparser():
|
||||
display_help()
|
||||
sys.exit(1)
|
||||
|
||||
if sys.argv[2] in ['-v', '--var']:
|
||||
if sys.argv[2] in ['-v', '--var']:
|
||||
varc = sys.argv[3]
|
||||
return server_id, user
|
||||
|
||||
|
@ -81,12 +81,11 @@ def main():
|
||||
for id_serv in liste_serveurs :
|
||||
ret = proxy.serveurs.del_serveur(id_serv)
|
||||
if ret[1]:
|
||||
print_orange('Erreur : ' + str(ret[1]))
|
||||
sys.exit(1)
|
||||
|
||||
print('Les serveurs {} ont été supprimés'.format(liste_serveurs))
|
||||
|
||||
|
||||
if ret[1] == "ok":
|
||||
print('Les serveurs {} ont été supprimés'.format(liste_serveurs))
|
||||
else:
|
||||
print_orange('Erreur : ' + str(ret[1]))
|
||||
sys.exit(1)
|
||||
|
||||
def get_pwd(addr, port):
|
||||
"""lecture d'un login/passwd pour l'application zephir
|
||||
|
@ -40,7 +40,7 @@ def argparser():
|
||||
display_help()
|
||||
sys.exit(1)
|
||||
|
||||
if sys.argv[2] in ['-s', '--script']:
|
||||
if sys.argv[2] in ['-s', '--script']:
|
||||
script = sys.argv[3]
|
||||
return group_id, script, None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user