Skip to content
Snippets Groups Projects
Commit 18d8603f authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove the hacky stuff from mesh scripts

parent ebd45894
No related branches found
No related tags found
No related merge requests found
......@@ -122,19 +122,12 @@ function mesh_babel {
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 ' 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 ' systemctl restart avahi-daemon' >> $babel_script
echo ' else' >> $babel_script
echo ' service avahi-daemon restart' >> $babel_script
echo ' echo "babel" > /tmp/meshtype' >> $babel_script
echo ' fi' >> $babel_script
echo ' echo "babel" > /tmp/meshtype' >> $babel_script
echo 'fi' >> $babel_script
echo '' >> $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-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 ' if ! grep -q "avahi-daemon" /etc/crontab; then' >> $batman_script
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
echo " echo '* * * * * root systemctl restart avahi-daemon > /dev/null' >> /etc/crontab" >> $batman_script
echo ' else' >> $batman_script
echo " echo '* * * * * root service avahi-daemon restart > /dev/null' >> /etc/crontab" >> $batman_script
echo ' fi' >> $batman_script
echo ' if [ -f /bin/systemctl ]; then' >> $batman_script
echo ' systemctl restart avahi-daemon' >> $batman_script
echo ' else' >> $batman_script
echo ' service avahi-daemon restart' >> $batman_script
echo ' fi' >> $batman_script
echo 'fi' >> $batman_script
echo '' >> $batman_script
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment