This commit is contained in:
Bob Mottram 2018-05-13 21:42:53 +01:00
parent 9d7e1c5263
commit 32403cbd1c
1 changed files with 1 additions and 2 deletions

View File

@ -230,8 +230,7 @@ function add_ddns_domain {
fi
if ! grep -q "$CURRENT_DDNS_DOMAIN" "${INADYN_CONFIG_FILE}"; then
DDNS_HOSTNAMES=$(grep 'hostname ' "${INADYN_CONFIG_FILE}"| awk -F '{' '{print $2}' | sed 's| }||g')
sed -i "s|hostname .*|hostname = {${DDNS_HOSTNAMES}, ${CURRENT_DDNS_DOMAIN} }|g" "${INADYN_CONFIG_FILE}"
sed -i "s|hostname .*|hostname = $DEFAULT_DOMAIN_NAME"
fi
chmod 600 "${INADYN_CONFIG_FILE}"