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
3f7be9c1
Commit
3f7be9c1
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Function to remove tox
parent
137821b9
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-app-tox
+34
-0
34 additions, 0 deletions
src/freedombone-app-tox
src/freedombone-mesh-install
+14
-1
14 additions, 1 deletion
src/freedombone-mesh-install
with
48 additions
and
1 deletion
src/freedombone-app-tox
+
34
−
0
View file @
3f7be9c1
...
...
@@ -62,6 +62,40 @@ function remove_tox_node {
exit
763836
fi
sed
-i
'/install_tox_node/d'
$COMPLETION_FILE
sed
-i
'/configure_firewall_for_tox/d'
$COMPLETION_FILE
}
function
remove_tox_avahi
{
if
!
grep
-Fxq
"tox_avahi"
$COMPLETION_FILE
;
then
return
fi
cd
$INSTALL_DIR
/toxid
make uninstall
rm
-rf
$INSTALL_DIR
/toxid
sed
-i
'/toxavahi/d'
/etc/crontab
systemctl restart cron
sed
-i
'/tox_avahi/d'
$COMPLETION_FILE
}
function
remove_tox_client
{
if
!
grep
-Fxq
"install_tox_client"
$COMPLETION_FILE
;
then
return
fi
${
PROJECT_NAME
}
-mesh-install
-f
tox_client
--remove
yes
if
[
!
"
$?
"
=
"0"
]
;
then
echo
$'Could not remove Tox client'
exit
737253
fi
sed
-i
'/install_tox_client/d'
$COMPLETION_FILE
sed
-i
'/Tox /d'
$COMPLETION_FILE
sed
-i
'/Toxic /d'
$COMPLETION_FILE
}
function
remove_tox
{
remove_tox_client
remove_tox_avahi
remove_tox_node
}
function
configure_firewall_for_tox
{
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-mesh-install
+
14
−
1
View file @
3f7be9c1
...
...
@@ -589,6 +589,15 @@ function mesh_tox_node {
$CHROOT_PREFIX
systemctl
enable
tox-bootstrapd.service
}
function
mesh_tox_client_remove
{
if
[
!
-d
$INSTALL_DIR
/toxic
]
;
then
return
fi
cd
$INSTALL_DIR
/toxic
make uninstall
rm
-rf
$INSTALL_DIR
/toxic
}
function
mesh_tox_client
{
if
[
-f
/usr/local/bin/
${
PROJECT_NAME
}
]
;
then
TOXIC_FILE
=
$(
cat
/usr/local/bin/
${
PROJECT_NAME
}
-app-tox
|
grep
"TOXIC_FILE="
|
head
-n
1 |
awk
-F
'='
'{print $2}'
)
...
...
@@ -1106,7 +1115,11 @@ if [[ $FN == 'tox_node' ]]; then
fi
fi
if
[[
$FN
==
'tox_client'
]]
;
then
mesh_tox_client
if
[[
$REMOVE
!=
'yes'
]]
;
then
mesh_tox_client
else
mesh_tox_client_remove
fi
fi
if
[[
$FN
==
'zeronet'
]]
;
then
mesh_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