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
44a4957a
Commit
44a4957a
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Use reload rather than restart to avoid ssh disconnections
parent
21ef7525
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-utils-onion
+5
-5
5 additions, 5 deletions
src/freedombone-utils-onion
with
5 additions
and
5 deletions
src/freedombone-utils-onion
+
5
−
5
View file @
44a4957a
...
...
@@ -41,8 +41,8 @@ function wait_for_onion_service {
done
if
[
!
-f
/var/lib/tor/hidden_service_
${
onion_service_name
}
/hostname
]
;
then
# re
start
and try a second time
systemctl re
start
tor
# re
load
and try a second time
systemctl re
load
tor
sleep_ctr
=
0
while
[
!
-f
/var/lib/tor/hidden_service_
${
onion_service_name
}
/hostname
]
;
do
sleep
1
...
...
@@ -72,7 +72,7 @@ function remove_onion_service {
shred
-zu
/var/lib/tor/hidden_service_
${
onion_service_name
}
/
*
rm
-rf
/var/lib/tor/hidden_service_
${
onion_service_name
}
fi
systemctl re
start
tor
systemctl re
load
tor
}
function
add_onion_service
{
...
...
@@ -94,7 +94,7 @@ function add_onion_service {
echo
"HiddenServicePort
${
onion_service_port_from
}
127.0.0.1:
${
onion_service_port_to
}
"
>>
/etc/tor/torrc
fi
systemctl re
start
tor
systemctl re
load
tor
function_check wait_for_onion_service
wait_for_onion_service
${
onion_service_name
}
...
...
@@ -253,7 +253,7 @@ function resolve_dns_via_tor {
echo
'DNSPort 53'
>>
/etc/tor/torrc
echo
'AutomapHostsOnResolve 1'
>>
/etc/tor/torrc
echo
'AutomapHostsSuffixes .exit,.onion'
>>
/etc/tor/torrc
systemctl re
start
tor
systemctl re
load
tor
fi
# don't change resolv.conf
...
...
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