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
a6a7ba62
Commit
a6a7ba62
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
meshweb no longer used
parent
85fa9bed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-meshweb
+0
-81
0 additions, 81 deletions
src/freedombone-meshweb
with
0 additions
and
81 deletions
src/freedombone-meshweb
deleted
100755 → 0
+
0
−
81
View file @
85fa9bed
#!/bin/bash
#
# .---. . .
# | | |
# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
# | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
# ' ' --' --' -' - -' ' ' -' -' -' ' - --'
#
# Freedom in the Cloud
#
# Web interface for the mesh
#
# License
# =======
#
# Copyright (C) 2015-2016 Bob Mottram <bob@robotics.uk.to>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
PROJECT_NAME
=
'freedombone'
export
TEXTDOMAIN
=
${
PROJECT_NAME
}
-meshweb
export
TEXTDOMAINDIR
=
"/usr/share/locale"
MESH_INSTALL_DIR
=
/var/lib
PEERS_FILE
=
/tmp/meshwebstart
if
[
-d
$MESH_INSTALL_DIR
/zeronet
]
;
then
ZERONET_DIR
=
$MESH_INSTALL_DIR
/zeronet
fi
avahi-browse
-atl
|
awk
-F
' '
'{print $4}'
|
sort
-u
>
$PEERS_FILE
if
[
!
-f
$PEERS_FILE
]
;
then
echo
$'No peers were found'
exit
0
fi
# count the peers
ctr
=
0
while
IFS
=
''
read
-r
line
||
[[
-n
"
$line
"
]]
;
do
ctr
=
$((
ctr
+
1
))
done
<
"
$PEERS_FILE
"
rm
$PEERS_FILE
# enough peers
if
[
${
ctr
}
-lt
"1"
]
;
then
echo
$'No peers were found'
exit
0
fi
ZERONET_INDEX
=
$MESH_INSTALL_DIR
/zeronet/mesh.html
if
which firefox
>
/dev/null
;
then
firefox
$ZERONET_INDEX
elif
which midori
>
/dev/null
;
then
midori
$ZERONET_INDEX
elif
which iceweasel
>
/dev/null
;
then
iceweasel
$ZERONET_INDEX
elif
which chrome
>
/dev/null
;
then
chrome
$ZERONET_INDEX
elif
which chromium
>
/dev/null
;
then
chromium
$ZERONET_INDEX
elif
which xdg-open
>
/dev/null
;
then
xdg-open
$ZERONET_INDEX
elif
which gnome-open
>
/dev/null
;
then
gnome-open
$ZERONET_INDEX
fi
exit
0
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