#!/usr/bin/env bash geoconf=/etc/knot/geo.conf remote='cdn@us.projectsegfau.lt' printf '' > $geoconf for i in $(> $geoconf sed -i "s/REPLACEME/${i}/" $geoconf done scp $geoconf "${remote}":/var/geo.conf ssh $remote "sudo systemctl restart knot" systemctl restart knot