Skip to content

Commit

Permalink
Merge pull request #305 from mekanix/feature/empty-hostname
Browse files Browse the repository at this point in the history
Handle case when hostname is empty
  • Loading branch information
mekanix authored Mar 26, 2023
2 parents cef3caa + 8a33c64 commit 108e7fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ SOCKET="${SOCKET_DIR}/reggae.sock"
MYPID=""



cleanup() {
pkill -P ${MYPID}
rm -rf ${SOCKET}
}


trap cleanup HUP INT ABRT BUS TERM EXIT


Expand Down Expand Up @@ -60,7 +58,10 @@ run() {
unregister_v6 ${ip}
fi
fi
/usr/sbin/local-unbound-control flush ${fqdn}
first=$(echo ${fqdn} | cut -f 1 -d '.')
if [ ! -z "${first}" ]; then
/usr/sbin/local-unbound-control flush ${fqdn}
fi
done
}

Expand Down

0 comments on commit 108e7fc

Please sign in to comment.