summaryrefslogtreecommitdiffstats
path: root/dehydrated
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2022-06-13 17:13:45 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-06-14 11:59:26 +0000
commitca1dfda799ee14bbbec763ac4d6f0f17e1414f93 (patch)
tree16132168170262c083d605812d66003a3c9a0203 /dehydrated
parentAdding top-level makefile. (diff)
downloadservice-tools-ca1dfda799ee14bbbec763ac4d6f0f17e1414f93.tar.xz
service-tools-ca1dfda799ee14bbbec763ac4d6f0f17e1414f93.zip
Adding quotes arround some variables in dehydrated-tools to prevent globbing and word splitting.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'dehydrated')
-rwxr-xr-xdehydrated/bin/dehydrated-nsupdate6
-rwxr-xr-xdehydrated/share/hooks/exit_hook.service-reload6
2 files changed, 6 insertions, 6 deletions
diff --git a/dehydrated/bin/dehydrated-nsupdate b/dehydrated/bin/dehydrated-nsupdate
index 96c95eb..61c2e84 100755
--- a/dehydrated/bin/dehydrated-nsupdate
+++ b/dehydrated/bin/dehydrated-nsupdate
@@ -109,12 +109,12 @@ NAMESERVERS_IPV4=""
for NAMESERVER in ${NAMESERVERS}
do
- if [ -n "$(${DIG} +nocomments +noquestion +short AAAA ${NAMESERVER})" ]
+ if [ -n "$(${DIG} +nocomments +noquestion +short AAAA "${NAMESERVER}")" ]
then
NAMESERVERS_IPV6="${NAMESERVERS_IPV6} ${NAMESERVER}"
fi
- if [ -n "$(${DIG} +nocomments +noquestion +short A ${NAMESERVER})" ]
+ if [ -n "$(${DIG} +nocomments +noquestion +short A "${NAMESERVER}")" ]
then
NAMESERVERS_IPV4="${NAMESERVERS_IPV4} ${NAMESERVER}"
fi
@@ -133,7 +133,7 @@ then
NAMESERVERS="${NAMESERVERS} ${NAMESERVERS_IPV4}"
fi
-NAMESERVERS="$(echo ${NAMESERVERS} | sed -e 's| |\n|g' | sort -u -V)"
+NAMESERVERS="$(echo "${NAMESERVERS}" | sed -e 's| |\n|g' | sort -u -V)"
# update nameservers
if [ -n "${TSIG_KEYFILE}" ] && [ -e "${TSIG_KEYFILE}" ]
diff --git a/dehydrated/share/hooks/exit_hook.service-reload b/dehydrated/share/hooks/exit_hook.service-reload
index 060f81a..486c62f 100755
--- a/dehydrated/share/hooks/exit_hook.service-reload
+++ b/dehydrated/share/hooks/exit_hook.service-reload
@@ -27,11 +27,11 @@ echo " + Reloading services..."
for SERVICE in ${SERVICES}
do
- if service ${SERVICE} status > /dev/null 2>&1
+ if service "${SERVICE}" status > /dev/null 2>&1
then
echo -n " + ${SERVICE}:"
- service ${SERVICE} reload || service ${SERVICE} restart
+ service "${SERVICE}" reload || service "${SERVICE}" restart
echo " done."
fi
@@ -48,7 +48,7 @@ then
for NUMBER in $(seq 1 "${NUMBER}")
do
echo -n " #${NUMBER}"
- service kresd@${NUMBER} restart
+ service kresd@"${NUMBER}" restart
done
echo " done."