Parcourir la source

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

Bob Mottram il y a 6 ans
Parent
révision
757313ee3a
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8
    0
      src/freedombone-utils-avahi

+ 8
- 0
src/freedombone-utils-avahi Voir le fichier

137
       echo 'fi';
137
       echo 'fi';
138
       echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
138
       echo '# End of avahi'; } >> "/usr/bin/$WATCHDOG_SCRIPT_NAME"
139
     chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
139
     chmod +x "/usr/bin/$WATCHDOG_SCRIPT_NAME"
140
+
141
+    # This is a bit of a hack to ensure that avahi services get broadcast
142
+    # Without this some other systems may not be able to see the server
143
+    { echo '#!/bin/bash';
144
+      echo 'systemctl restart avahi-daemon'; } > /usr/bin/restartavahi
145
+    chmod +x /usr/bin/restartavahi
146
+
147
+    cron_add_mins 10 /usr/bin/restartavahi
140
 }
148
 }
141
 
149
 
142
 function install_avahi {
150
 function install_avahi {