Change the Hostname

hostnamectl set-hostname "${NEW_HOSTNAME}"
sed -re "s/raspberrypi/${NEW_HOSTNAME}/" -i /etc/hosts