Tidy avahi utils
This commit is contained in:
parent
443d7a7913
commit
bcf377b9cd
|
@ -57,6 +57,7 @@ function create_avahi_service {
|
||||||
}
|
}
|
||||||
|
|
||||||
function mesh_avahi {
|
function mesh_avahi {
|
||||||
|
# shellcheck disable=SC2154
|
||||||
chroot "$rootdir" apt-get -yq install avahi-utils avahi-dnsconfd
|
chroot "$rootdir" apt-get -yq install avahi-utils avahi-dnsconfd
|
||||||
|
|
||||||
decarray=( 1 2 3 4 5 6 7 8 9 0 )
|
decarray=( 1 2 3 4 5 6 7 8 9 0 )
|
||||||
|
@ -126,13 +127,12 @@ function install_avahi {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${PROJECT_NAME}-mesh-install -f avahi
|
if ! "${PROJECT_NAME}-mesh-install" -f avahi; then
|
||||||
if [ ! "$?" = "0" ]; then
|
|
||||||
echo $'Failed to install avahi'
|
echo $'Failed to install avahi'
|
||||||
exit 68442
|
exit 68442
|
||||||
fi
|
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
|
||||||
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
|
else
|
||||||
|
|
Loading…
Reference in New Issue