Send a RELOAD to a running tincd when a new invitation key has been generated.

This commit is contained in:
Guus Sliepen 2013-09-01 22:59:51 +02:00
parent 4e7e4818b7
commit 933f7f7526

View file

@ -340,12 +340,17 @@ int cmd_invite(int argc, char *argv[]) {
}
chmod(filename, 0600);
ecdsa_write_pem_private_key(key, f);
fclose(f);
if(connect_tincd(false))
sendline(fd, "%d %d", CONTROL, REQ_RELOAD);
} else {
key = ecdsa_read_pem_private_key(f);
fclose(f);
if(!key)
fprintf(stderr, "Could not read private key from %s\n", filename);
}
fclose(f);
free(filename);
if(!key)
return 1;