GUI: status accuracy + remove-only action; sync script peer names on exists
This commit is contained in:
@@ -257,7 +257,13 @@ cmd_add() {
|
||||
|
||||
if peer_exists_by_pubkey "$client_pubkey"; then
|
||||
local existing_addr
|
||||
local existing_allowed
|
||||
existing_addr="$(extract_peer_address_by_pubkey "$client_pubkey")"
|
||||
existing_allowed="${existing_addr:-}"
|
||||
if [[ -n "$client_routes" ]]; then
|
||||
existing_allowed="${existing_allowed},${client_routes}"
|
||||
fi
|
||||
sync_gui_db_upsert_peer "$client_name" "$client_pubkey" "${existing_addr:-}" "$client_routes" "$client_psk" "${existing_allowed}" 1
|
||||
cat <<EOF_OUT
|
||||
STATUS=exists
|
||||
CLIENT_NAME=$client_name
|
||||
|
||||
Reference in New Issue
Block a user