From a16f57816a9c5c9401ee6de92725a5f94b93d447 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 26 Apr 2024 14:07:46 +0200 Subject: [PATCH] write --- cd.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cd.sh b/cd.sh index cd52fec..babce94 100644 --- a/cd.sh +++ b/cd.sh @@ -32,6 +32,16 @@ function step { fi } +function write { +local file="${1}" +local text="${2}" + if [ "${file}" ] ; then + echo -n "${text}" \ + > "${file}" \ + || exit + fi +} + step "set name servers" for server in "${CD_DNS_SERVERS[@]}" ; do echo "nameserver ${server}" \