Remove the hacky stuff from mesh scripts
This commit is contained in:
parent
ebd4589435
commit
18d8603f0f
|
@ -122,19 +122,12 @@ function mesh_babel {
|
||||||
echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $babel_script
|
echo ' apt-get -y install avahi-utils avahi-autoipd avahi-daemon avahi-dnsconfd' >> $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 ' 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 ! grep -q "avahi-daemon" /etc/crontab; then' >> $babel_script
|
|
||||||
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
|
||||||
echo " echo '* * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $babel_script
|
|
||||||
echo ' else' >> $babel_script
|
|
||||||
echo " echo '* * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $babel_script
|
|
||||||
echo ' fi' >> $babel_script
|
|
||||||
echo ' fi' >> $babel_script
|
|
||||||
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
echo ' if [ -f /bin/systemctl ]; then' >> $babel_script
|
||||||
echo ' systemctl restart avahi-daemon' >> $babel_script
|
echo ' systemctl restart avahi-daemon' >> $babel_script
|
||||||
echo ' else' >> $babel_script
|
echo ' else' >> $babel_script
|
||||||
echo ' service avahi-daemon restart' >> $babel_script
|
echo ' service avahi-daemon restart' >> $babel_script
|
||||||
echo ' echo "babel" > /tmp/meshtype' >> $babel_script
|
|
||||||
echo ' fi' >> $babel_script
|
echo ' fi' >> $babel_script
|
||||||
|
echo ' echo "babel" > /tmp/meshtype' >> $babel_script
|
||||||
echo 'fi' >> $babel_script
|
echo 'fi' >> $babel_script
|
||||||
echo '' >> $babel_script
|
echo '' >> $babel_script
|
||||||
echo "IFACE=$WIFI_INTERFACE" >> $babel_script
|
echo "IFACE=$WIFI_INTERFACE" >> $babel_script
|
||||||
|
@ -207,12 +200,10 @@ function mesh_batman {
|
||||||
echo ' sed -i "s|use-ipv4=.*|use-ipv4=yes|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
echo ' sed -i "s|use-ipv4=.*|use-ipv4=yes|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
||||||
echo ' sed -i "s|use-ipv6=.*|use-ipv6=no|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
echo ' sed -i "s|use-ipv6=.*|use-ipv6=no|g" /etc/avahi/avahi-daemon.conf' >> $batman_script
|
||||||
echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script
|
echo ' sed -i "s|hosts:.*|hosts: files mdns4_minimal dns mdns4 mdns|g" /etc/nsswitch.conf' >> $batman_script
|
||||||
echo ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script
|
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
||||||
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
|
echo ' systemctl restart avahi-daemon' >> $batman_script
|
||||||
echo " echo '* * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script
|
echo ' else' >> $batman_script
|
||||||
echo ' else' >> $batman_script
|
echo ' service avahi-daemon restart' >> $batman_script
|
||||||
echo " echo '* * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script
|
|
||||||
echo ' fi' >> $batman_script
|
|
||||||
echo ' fi' >> $batman_script
|
echo ' fi' >> $batman_script
|
||||||
echo 'fi' >> $batman_script
|
echo 'fi' >> $batman_script
|
||||||
echo '' >> $batman_script
|
echo '' >> $batman_script
|
||||||
|
|
Loading…
Reference in New Issue