|
@@ -118,6 +118,9 @@ function mesh_babel {
|
118
|
118
|
echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $babel_script
|
119
|
119
|
echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
|
120
|
120
|
echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
|
|
121
|
+ echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $babel_script
|
|
122
|
+ echo " echo '2 * * * * root systemctl restart avahi-daemon' >> /etc/crontab" >> $babel_script
|
|
123
|
+ echo ' fi' >> $babel_script
|
121
|
124
|
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
122
|
125
|
echo ' systemctl restart avahi-daemon' >> $babel_script
|
123
|
126
|
echo ' else' >> $babel_script
|
|
@@ -195,6 +198,9 @@ function mesh_batman {
|
195
|
198
|
echo ' sed -i "s|use-ipv4=.*|use-ipv4=yes|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
196
|
199
|
echo ' sed -i "s|use-ipv6=.*|use-ipv6=no|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
197
|
200
|
echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script
|
|
201
|
+ echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script
|
|
202
|
+ echo " echo '2 * * * * root systemctl restart avahi-daemon' >> /etc/crontab" >> $batman_script
|
|
203
|
+ echo ' fi' >> $batman_script
|
198
|
204
|
echo 'fi' >> $batman_script
|
199
|
205
|
echo '' >> $batman_script
|
200
|
206
|
echo '# Mesh definition' >> $batman_script
|