correction set_userkey error message

This commit is contained in:
Matthieu Lamalle 2021-07-01 16:14:04 +02:00
parent e7903ded1b
commit 7b4414b137

View File

@ -62,6 +62,7 @@ def main():
keyssh = f.read() keyssh = f.read()
clef_ssh = base64.encodestring(keyssh).decode() clef_ssh = base64.encodestring(keyssh).decode()
os.chdir("/etc/postgresql/")
cmd="""sudo -u postgres psql -c "update users set cle='{}' where login='{}';" zephir""".format(clef_ssh,user) cmd="""sudo -u postgres psql -c "update users set cle='{}' where login='{}';" zephir""".format(clef_ssh,user)
output = os.popen(cmd) output = os.popen(cmd)
res = output.read().strip() res = output.read().strip()