|
@@ -122,19 +122,12 @@ function mesh_babel {
|
122
|
122
|
echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $babel_script
|
123
|
123
|
echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
|
124
|
124
|
echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $babel_script
|
125
|
|
- echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $babel_script
|
126
|
|
- echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
127
|
|
- echo " echo '* * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $babel_script
|
128
|
|
- echo ' else' >> $babel_script
|
129
|
|
- echo " echo '* * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $babel_script
|
130
|
|
- echo ' fi' >> $babel_script
|
131
|
|
- echo ' fi' >> $babel_script
|
132
|
125
|
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
133
|
126
|
echo ' systemctl restart avahi-daemon' >> $babel_script
|
134
|
127
|
echo ' else' >> $babel_script
|
135
|
128
|
echo ' service avahi-daemon restart' >> $babel_script
|
136
|
|
- echo ' echo "babel" > /tmp/meshtype' >> $babel_script
|
137
|
129
|
echo ' fi' >> $babel_script
|
|
130
|
+ echo ' echo "babel" > /tmp/meshtype' >> $babel_script
|
138
|
131
|
echo 'fi' >> $babel_script
|
139
|
132
|
echo '' >> $babel_script
|
140
|
133
|
echo "IFACE=$WIFI_INTERFACE" >> $babel_script
|
|
@@ -207,12 +200,10 @@ function mesh_batman {
|
207
|
200
|
echo ' sed -i "s|use-ipv4=.*|use-ipv4=yes|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
208
|
201
|
echo ' sed -i "s|use-ipv6=.*|use-ipv6=no|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
209
|
202
|
echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script
|
210
|
|
- echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script
|
211
|
|
- echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
212
|
|
- echo " echo '* * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script
|
213
|
|
- echo ' else' >> $batman_script
|
214
|
|
- echo " echo '* * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script
|
215
|
|
- echo ' fi' >> $batman_script
|
|
203
|
+ echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
|
204
|
+ echo ' systemctl restart avahi-daemon' >> $batman_script
|
|
205
|
+ echo ' else' >> $batman_script
|
|
206
|
+ echo ' service avahi-daemon restart' >> $batman_script
|
216
|
207
|
echo ' fi' >> $batman_script
|
217
|
208
|
echo 'fi' >> $batman_script
|
218
|
209
|
echo '' >> $batman_script
|