Skip to content

Commit

Permalink
Merge pull request #140 from sudomesh/fixmeshonboot
Browse files Browse the repository at this point in the history
Fix mesh on boot
  • Loading branch information
grant_____ authored Oct 24, 2018
2 parents 538deee + 530a792 commit 7281075
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 3 additions & 0 deletions files/opt/mesh/autoconf
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ sed -i -e "s/<ins.ert.mes.hip>/$MESHIP/g" /root/config_succeeded
/etc/init.d/meshrouting enable
/etc/init.d/babeld enable

# kill cron job
sed -i '/retrieve_ip/d' /etc/crontabs/root

echo "node reconfigured with mesh IP "$MESHIP
echo "if running manually, please reboot to apply changes"

Expand Down
10 changes: 1 addition & 9 deletions files/opt/mesh/retrieve_ip
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,5 @@ echo "recieved mesh block:" $MESHBLOCK"/26" >>$LOG

# complete rest of configurations in a reusable script
/opt/mesh/autoconf $MESHIP

# start some services
/etc/init.d/babeld start
/etc/init.d/meshrouting start

# remove cron job, set to reboot, and delete this script
echo "deleting cronjob, removing /opt/mesh/retrieve_ip, and rebooting" >>$LOG
sed -i '/retrieve_ip/d' /etc/crontabs/root
echo "rebooting" >>$LOG
reboot -d 10
rm -- "$0"

0 comments on commit 7281075

Please sign in to comment.