Try to ensure that avahi serices always remain visible on the LAN

This commit is contained in:
Bob Mottram 2018-05-27 12:58:09 +01:00
parent cc875c00fe
commit 757313ee3a
1 changed files with 8 additions and 0 deletions

View File

@ -137,6 +137,14 @@ function keep_avahi_running {
echo 'fi';
echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
# This is a bit of a hack to ensure that avahi services get broadcast
# Without this some other systems may not be able to see the server
{ echo '#!/bin/bash';
echo 'systemctl restart avahi-daemon'; } > /usr/bin/restartavahi
chmod +x /usr/bin/restartavahi
cron_add_mins 10 /usr/bin/restartavahi
}
function install_avahi {