Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
4b19fc06
Commit
4b19fc06
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Stopping mesh protocol before starting another
parent
73dd4018
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-mesh-batman
+8
-0
8 additions, 0 deletions
src/freedombone-mesh-batman
src/freedombone-mesh-bmx6
+8
-1
8 additions, 1 deletion
src/freedombone-mesh-bmx6
src/freedombone-utils-mesh
+19
-0
19 additions, 0 deletions
src/freedombone-utils-mesh
with
35 additions
and
1 deletion
src/freedombone-mesh-batman
+
8
−
0
View file @
4b19fc06
...
...
@@ -97,6 +97,10 @@ function stop {
disable_mesh_firewall
systemctl restart network-manager
if
[
-f
$MESH_CURRENT_PROTOCOL
]
;
then
rm
$MESH_CURRENT_PROTOCOL
fi
}
function
verify
{
...
...
@@ -152,6 +156,8 @@ function start {
fi
echo
"info: enabling batman-adv mesh network
$WIFI_SSID
on
$IFACE
"
mesh_protocol_stop
systemctl stop network-manager
sleep
5
...
...
@@ -225,6 +231,8 @@ function start {
systemctl restart nginx
verify
echo
"batman-adv"
>
$MESH_CURRENT_PROTOCOL
}
function
monitor
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-mesh-bmx6
+
8
−
1
View file @
4b19fc06
...
...
@@ -87,6 +87,10 @@ function stop {
disable_mesh_firewall
systemctl restart network-manager
if
[
-f
$MESH_CURRENT_PROTOCOL
]
;
then
rm
$MESH_CURRENT_PROTOCOL
fi
}
function
verify
{
...
...
@@ -133,7 +137,8 @@ function start {
fi
echo
"info: enabling BMX6 mesh network
$WIFI_SSID
on
$IFACE
"
batman stop
mesh_protocol_stop
systemctl stop network-manager
sleep
5
...
...
@@ -207,6 +212,8 @@ function start {
systemctl restart nginx
verify
echo
"bmx6"
>
$MESH_CURRENT_PROTOCOL
}
function
monitor
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-mesh
+
19
−
0
View file @
4b19fc06
...
...
@@ -28,6 +28,25 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# File which contains the current protocol in use
MESH_CURRENT_PROTOCOL
=
~/.mesh_protocol
function
mesh_protocol_stop
{
if
[
!
-f
$MESH_CURRENT_PROTOCOL
]
;
then
return
fi
if
grep
-q
"bmx6"
$MESH_CURRENT_PROTOCOL
;
then
bmx stop
fi
if
grep
-q
"batman-adv"
$MESH_CURRENT_PROTOCOL
;
then
batman stop
fi
rm
$MESH_CURRENT_PROTOCOL
}
function
mesh_protocol_init
{
if
[[
$1
==
"start"
]]
;
then
# install avahi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment