Send a RELOAD to a running tincd when a new invitation key has been generated.
This commit is contained in:
parent
4e7e4818b7
commit
933f7f7526
1 changed files with 6 additions and 1 deletions
|
@ -340,12 +340,17 @@ int cmd_invite(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
chmod(filename, 0600);
|
chmod(filename, 0600);
|
||||||
ecdsa_write_pem_private_key(key, f);
|
ecdsa_write_pem_private_key(key, f);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
if(connect_tincd(false))
|
||||||
|
sendline(fd, "%d %d", CONTROL, REQ_RELOAD);
|
||||||
} else {
|
} else {
|
||||||
key = ecdsa_read_pem_private_key(f);
|
key = ecdsa_read_pem_private_key(f);
|
||||||
|
fclose(f);
|
||||||
if(!key)
|
if(!key)
|
||||||
fprintf(stderr, "Could not read private key from %s\n", filename);
|
fprintf(stderr, "Could not read private key from %s\n", filename);
|
||||||
}
|
}
|
||||||
fclose(f);
|
|
||||||
free(filename);
|
free(filename);
|
||||||
if(!key)
|
if(!key)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue