Only install avahi on mesh startup
This commit is contained in:
parent
e066ab1537
commit
0d9340dc75
|
@ -149,14 +149,16 @@ function mesh_batman {
|
||||||
|
|
||||||
echo '#!/bin/sh' > $batman_script
|
echo '#!/bin/sh' > $batman_script
|
||||||
echo '' >> $batman_script
|
echo '' >> $batman_script
|
||||||
echo '# install avahi' >> $batman_script
|
echo 'if [[ $1 == "start" ]]; then' >> $batman_script
|
||||||
echo 'apt-get -y install avahi-utils avahi-autoipd' >> $batman_script
|
echo ' # install avahi' >> $batman_script
|
||||||
echo 'sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
echo ' apt-get -y install avahi-utils avahi-autoipd' >> $batman_script
|
||||||
echo 'sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
echo ' sed -i "s|#host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
||||||
echo 'if [ -f /bin/systemctl ]; then' >> $batman_script
|
echo ' sed -i "s|host-name=.*|host-name=$(hostname)|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
||||||
|
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
||||||
echo ' systemctl restart avahi-daemon' >> $batman_script
|
echo ' systemctl restart avahi-daemon' >> $batman_script
|
||||||
echo 'else' >> $batman_script
|
echo ' else' >> $batman_script
|
||||||
echo ' service avahi-daemon restart' >> $batman_script
|
echo ' service avahi-daemon restart' >> $batman_script
|
||||||
|
echo ' fi' >> $batman_script
|
||||||
echo 'fi' >> $batman_script
|
echo 'fi' >> $batman_script
|
||||||
echo '' >> $batman_script
|
echo '' >> $batman_script
|
||||||
echo '# Mesh definition' >> $batman_script
|
echo '# Mesh definition' >> $batman_script
|
||||||
|
|
Loading…
Reference in New Issue