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
68b0ae84
Commit
68b0ae84
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Compile toxid on mesh nodes
parent
7bd33c9a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/freedombone-image-customise
+28
-13
28 additions, 13 deletions
src/freedombone-image-customise
src/freedombone-image-mesh
+29
-0
29 additions, 0 deletions
src/freedombone-image-mesh
with
57 additions
and
13 deletions
src/freedombone-image-customise
+
28
−
13
View file @
68b0ae84
...
...
@@ -596,19 +596,6 @@ function mesh_tox_node {
exit
76325
fi
if
[
-f
/usr/local/bin/
${
PROJECT_NAME
}
]
;
then
TOXID_REPO_MAIN
=
$(
cat
/usr/local/bin/
${
PROJECT_NAME
}
|
grep
"TOXID_REPO="
|
head
-n
1 |
awk
-F
'"'
'{print $2}'
)
else
TOXID_REPO_MAIN
=
$(
cat
/usr/bin/
${
PROJECT_NAME
}
|
grep
"TOXID_REPO="
|
head
-n
1 |
awk
-F
'"'
'{print $2}'
)
fi
if
[
${#
TOXID_REPO_MAIN
}
-gt
5
]
;
then
TOXID_REPO
=
$TOXID_REPO_MAIN
fi
if
[
!
$TOXID_REPO
]
;
then
echo
$'No ToxID repo was specified'
exit
78252
fi
if
[
-f
/usr/local/bin/
${
PROJECT_NAME
}
]
;
then
TOX_PORT_MAIN
=
$(
cat
/usr/local/bin/
${
PROJECT_NAME
}
|
grep
"TOX_PORT="
|
head
-n
1 |
awk
-F
'='
'{print $2}'
)
else
...
...
@@ -658,6 +645,33 @@ function mesh_tox_node {
fi
}
function
mesh_tox_avahi
{
if
[
!
-d
$rootdir
/etc/avahi
]
;
then
echo
$'tox_avahi: avahi is not installed'
exit
87359
fi
if
[
-f
/usr/local/bin/
${
PROJECT_NAME
}
]
;
then
TOXID_REPO_MAIN
=
$(
cat
/usr/local/bin/
${
PROJECT_NAME
}
|
grep
"TOXID_REPO="
|
head
-n
1 |
awk
-F
'"'
'{print $2}'
)
else
TOXID_REPO_MAIN
=
$(
cat
/usr/bin/
${
PROJECT_NAME
}
|
grep
"TOXID_REPO="
|
head
-n
1 |
awk
-F
'"'
'{print $2}'
)
fi
if
[
${#
TOXID_REPO_MAIN
}
-gt
5
]
;
then
TOXID_REPO
=
$TOXID_REPO_MAIN
fi
if
[
!
$TOXID_REPO
]
;
then
echo
$'No ToxID repo was specified'
exit
78252
fi
# install a command to obtain the Tox ID
chroot
"
$rootdir
"
$INSTALL_DIR
chroot
"
$rootdir
"
git clone
$TOXID_REPO
$INSTALL_DIR
/toxid
if
[
!
-d
$rootdir$INSTALL_DIR
/toxid
]
;
then
exit
63921
fi
}
function
mesh_tox_client
{
if
[
-f
/usr/local/bin/
${
PROJECT_NAME
}
]
;
then
TOXIC_FILE
=
$(
cat
/usr/local/bin/
${
PROJECT_NAME
}
|
grep
"TOXIC_FILE="
|
head
-n
1 |
awk
-F
'='
'{print $2}'
)
...
...
@@ -822,6 +836,7 @@ initialise_mesh() {
mesh_avahi
mesh_batman
mesh_tox_node
mesh_tox_avahi
mesh_tox_client
mesh_zeronet
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-image-mesh
+
29
−
0
View file @
68b0ae84
...
...
@@ -386,6 +386,34 @@ function compile_toxcore {
echo
$'toxcore compile completed'
>>
$INSTALL_LOG
}
function
compile_toxid
{
if
[
!
-d
$INSTALL_DIR
/toxid
]
;
then
echo
$'toxid repo not found'
>>
$INSTALL_LOG
exit
52682
fi
cd
$INSTALL_DIR
/toxid
if
[
-f
$INSTALL_DIR
/make_toxid.txt
]
;
then
rm
$INSTALL_DIR
/make_toxid.txt
fi
make
>
$INSTALL_DIR
/make_toxid.txt
if
[
!
"
$?
"
=
"0"
]
;
then
echo
$'Failed to compile toxid'
>>
$INSTALL_LOG
echo
$"See
$INSTALL_DIR
/make_toxid.txt"
>>
$INSTALL_LOG
exit
58432
fi
rm
$INSTALL_DIR
/make_toxid.txt
make
install
toxavahi
# publish regularly
if
!
grep
-q
"toxavahi"
/etc/crontab
;
then
echo
"* * * * * root toxavahi > /dev/null"
>>
/etc/crontab
fi
systemctl restart avahi-daemon
}
function
compile_tox_client
{
echo
$'Compiling tox client'
>>
$INSTALL_LOG
...
...
@@ -479,6 +507,7 @@ if [ -f /root/.initial_mesh_setup ]; then
configure_zeronet_mail
configure_zeronet_forum
compile_toxcore
compile_toxid
compile_tox_client
configure_toxcore
configure_zeronet
...
...
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