dns/previous
This commit is contained in:
parent
8d91c60e2d
commit
213e4e01f5
1 changed files with 3 additions and 1 deletions
4
cd.sh
4
cd.sh
|
@ -174,6 +174,7 @@ local text=""
|
||||||
text="${text}nameserver ${server}
|
text="${text}nameserver ${server}
|
||||||
"
|
"
|
||||||
done
|
done
|
||||||
|
cd_cat "${CD_DNS_FILE}"
|
||||||
cd_write "${CD_DNS_FILE}" "${text}"
|
cd_write "${CD_DNS_FILE}" "${text}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,7 +406,7 @@ local file="${1}"
|
||||||
|
|
||||||
cd_rm () {
|
cd_rm () {
|
||||||
if [ -e "${1}" ] ; then
|
if [ -e "${1}" ] ; then
|
||||||
echo "← $(realpath "${1}")"
|
echo "← ${1}"
|
||||||
rm --recursive "${1}" || exit
|
rm --recursive "${1}" || exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -443,6 +444,7 @@ cd_write () {
|
||||||
local file="${1}"
|
local file="${1}"
|
||||||
local text="${2}"
|
local text="${2}"
|
||||||
if [ "${file}" ] ; then
|
if [ "${file}" ] ; then
|
||||||
|
echo "→ ${1}"
|
||||||
echo -n "${text}" > "${file}" || exit
|
echo -n "${text}" > "${file}" || exit
|
||||||
cd_cat "${file}"
|
cd_cat "${file}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue