|
@@ -167,11 +167,6 @@ function mesh_batman {
|
167
|
167
|
echo ' apt-get -y install avahi-utils avahi-autoipd' >> $batman_script
|
168
|
168
|
echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
169
|
169
|
echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
170
|
|
- echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
171
|
|
- echo ' systemctl restart avahi-daemon' >> $batman_script
|
172
|
|
- echo ' else' >> $batman_script
|
173
|
|
- echo ' service avahi-daemon restart' >> $batman_script
|
174
|
|
- echo ' fi' >> $batman_script
|
175
|
170
|
echo 'fi' >> $batman_script
|
176
|
171
|
echo '' >> $batman_script
|
177
|
172
|
echo '# Mesh definition' >> $batman_script
|
|
@@ -240,6 +235,12 @@ function mesh_batman {
|
240
|
235
|
echo ' brctl addif $BRIDGE $EIFACE' >> $batman_script
|
241
|
236
|
echo ' ifconfig $BRIDGE up' >> $batman_script
|
242
|
237
|
echo ' fi' >> $batman_script
|
|
238
|
+ echo '' >> $batman_script
|
|
239
|
+ echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
|
240
|
+ echo ' systemctl restart avahi-daemon' >> $batman_script
|
|
241
|
+ echo ' else' >> $batman_script
|
|
242
|
+ echo ' service avahi-daemon restart' >> $batman_script
|
|
243
|
+ echo ' fi' >> $batman_script
|
243
|
244
|
echo '}' >> $batman_script
|
244
|
245
|
echo '' >> $batman_script
|
245
|
246
|
echo 'stop() {' >> $batman_script
|