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
1e626eb4
Commit
1e626eb4
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Beginning of amnesic mesh
parent
f8c28d51
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-image-mesh
+29
-0
29 additions, 0 deletions
src/freedombone-image-mesh
with
29 additions
and
0 deletions
src/freedombone-image-mesh
+
29
−
0
View file @
1e626eb4
...
...
@@ -50,6 +50,7 @@ TOX_NODES=
MESH_INSTALL_DIR
=
/var/lib
MESH_INSTALL_COMPLETED
=
/root/.mesh_setup_completed
MESH_INSTALL_SETUP
=
/root/.initial_mesh_setup
MESH_AMNESIC
=
/root/.amnesic
function
set_hostname
{
DEFAULT_DOMAIN_NAME
=
"
$1
"
...
...
@@ -525,6 +526,33 @@ function enable_batman_daemon {
systemctl daemon-reload
}
function
mesh_amnesic
{
if
[
!
-f
$MESH_AMNESIC
]
;
then
if
[
-f
/etc/systemd/system/amnesic.service
]
;
then
systemctl disable amnesic
fi
return
fi
if
[
!
-f
/etc/systemd/system/amnesic.service
]
;
then
echo
'[Unit]'
>
/etc/systemd/system/amnesic.service
echo
'Description=Amnesic Mesh'
>>
/etc/systemd/system/amnesic.service
echo
''
>>
/etc/systemd/system/amnesic.service
echo
'[Service]'
>>
/etc/systemd/system/amnesic.service
echo
'Type=oneshot'
>>
/etc/systemd/system/amnesic.service
echo
'RemainAfterExit=true'
>>
/etc/systemd/system/amnesic.service
echo
'ExecStart=/bin/true'
>>
/etc/systemd/system/amnesic.service
echo
'ExecStop=TODO'
>>
/etc/systemd/system/amnesic.service
echo
''
>>
/etc/systemd/system/amnesic.service
echo
'[Install]'
>>
/etc/systemd/system/amnesic.service
echo
'WantedBy=multi-user.target'
>>
/etc/systemd/system/amnesic.service
systemctl daemon-reload
fi
systemctl
enable
amnesic
systemctl start amnesic
}
# whether to reset the identity
if
[
$2
]
;
then
if
[[
"
$2
"
==
$"new"
*
]]
;
then
...
...
@@ -559,6 +587,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
configure_zeronet
disable_password_logins
disable_screen_lock
mesh_amnesic
rm
$MESH_INSTALL_SETUP
systemctl disable mesh-setup.service
...
...
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