#!/bin/sh HETZNER_API_TOKEN="" CNAME_TARGET="basedomain.local." ZONEID="basedomain.local" for SUBDOMAIN [it-tools kamera host3 host4 ...] do curl \ -X POST \ -H "Authorization: Bearer $HETZNER_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"'$SUBDOMAIN'","type":"CNAME","ttl":300,"records":[{"value":"'$CNAME_TARGET'","comment":""}]}' \ "https://api.hetzner.cloud/v1/zones/$ZONEID/rrsets" done