Tidy avahi utils

This commit is contained in:
Bob Mottram 2018-02-25 13:49:17 +00:00
parent 443d7a7913
commit bcf377b9cd
1 changed files with 3 additions and 3 deletions

View File

@ -57,6 +57,7 @@ function create_avahi_service {
}
function mesh_avahi {
# shellcheck disable=SC2154
chroot "$rootdir" apt-get -yq install avahi-utils avahi-dnsconfd
decarray=( 1 2 3 4 5 6 7 8 9 0 )
@ -126,13 +127,12 @@ function install_avahi {
return
fi
${PROJECT_NAME}-mesh-install -f avahi
if [ ! "$?" = "0" ]; then
if ! "${PROJECT_NAME}-mesh-install" -f avahi; then
echo $'Failed to install avahi'
exit 68442
fi
if [ $DEFAULT_DOMAIN_NAME ]; then
if [ "$DEFAULT_DOMAIN_NAME" ]; then
sed -i "s|#host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf
sed -i "s|host-name=.*|host-name=$LOCAL_NAME|g" /etc/avahi/avahi-daemon.conf
else