corrections
This commit is contained in:
@ -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__':
|
||||
|
Reference in New Issue
Block a user