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