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 fi
if ! grep -q "$CURRENT_DDNS_DOMAIN" "${INADYN_CONFIG_FILE}"; then 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 = $DEFAULT_DOMAIN_NAME"
sed -i "s|hostname .*|hostname = {${DDNS_HOSTNAMES}, ${CURRENT_DDNS_DOMAIN} }|g" "${INADYN_CONFIG_FILE}"
fi fi
chmod 600 "${INADYN_CONFIG_FILE}" chmod 600 "${INADYN_CONFIG_FILE}"