#!/bin/bash

SRV=${1:?need a fqdn}
NEWDISPLAY_NAME=${2:?new display name, a human readable one}
HTTP_PAYLOAD='{ "displayName": "'${NEWDISPLAY_NAME}'" }'

./ovhcli put "vps/${SRV}" "${HTTP_PAYLOAD}" | jq -r 'select(. != null)'

exit $?