wg-installer: check if a key is already inserted
authorNick Hainke <vincent@systemli.org>
Tue, 18 Jan 2022 17:31:46 +0000 (18:31 +0100)
committerNick Hainke <vincent@systemli.org>
Thu, 20 Jan 2022 08:19:04 +0000 (09:19 +0100)
commitda48bc3792705b12fc104459ed9f5f1b73544d17
tree34718a2d98e052e193adeb8c49a532f31e0ea20e
parent69c81790d1045e064cd9c643a1643a0f919f448d
wg-installer: check if a key is already inserted

Check if a peer is already existing with a given public key. Introduce a
response code for signaling why the server rejected the request.

Signed-off-by: Nick Hainke <vincent@systemli.org>
net/wg-installer/wg-client/lib/rpcd_ubus.sh
net/wg-installer/wg-server/lib/wg_functions.sh