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
1eeabefd
Commit
1eeabefd
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Don't need to monitor ip address on onion only
parent
d6553d77
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-installer
+12
-9
12 additions, 9 deletions
src/freedombone-installer
with
12 additions
and
9 deletions
src/freedombone-installer
+
12
−
9
View file @
1eeabefd
...
...
@@ -2608,16 +2608,19 @@ function update_dynamic_dns {
function
webadmin_monitor_ip_changes
{
if
[
-f
"$
webadmin_install_dir
/
dynamicdns.html
"
];
then
webadmin_monitor_ip_ctr=
$((webadmin_monitor_ip_ctr+1))
if
[
$
webadmin_monitor_ip_ctr
-gt
300
];
then
webadmin_monitor_ip_ctr=
0
curr_ipv4=
$(get_external_ipv4_address)
if
[[
"$
curr_ipv4
"
!=
"$
webadmin_ipv4_address
"
]];
then
if
[
"$
webadmin_ipv4_address
"
];
then
/
usr
/
local
/
bin
/${
PROJECT_NAME
}
-notification
-s
"[${
PROJECT_NAME
}]
Dynamic
DNS
"
-m
"
IP
address
changed
from
$
webadmin_ipv4_address
to
$
curr_ipv4
"
ONION_ONLY=
$(grep
'
ONION_ONLY=
' "$CONFIGURATION_FILE" | head -n 1 | awk -F '
='
'{
print
$2}')
if
[[
"$
ONION_ONLY
"
==
'
no
'
]];
then
webadmin_monitor_ip_ctr=
$((webadmin_monitor_ip_ctr+1))
if
[
$
webadmin_monitor_ip_ctr
-gt
300
];
then
webadmin_monitor_ip_ctr=
0
curr_ipv4=
$(get_external_ipv4_address)
if
[[
"$
curr_ipv4
"
!=
"$
webadmin_ipv4_address
"
]];
then
if
[
"$
webadmin_ipv4_address
"
];
then
/
usr
/
local
/
bin
/${
PROJECT_NAME
}
-notification
-s
"[${
PROJECT_NAME
}]
Dynamic
DNS
"
-m
"
IP
address
changed
from
$
webadmin_ipv4_address
to
$
curr_ipv4
"
fi
webadmin_ipv4_address=
"$curr_ipv4"
sed
-i
"
s
|<
p
class=
\"ipaddress\".*|<p
class=
\"ipaddress\"
translate=
\"no\"
>
${curr_ipv4}
</p>
|g" "$webadmin_install_dir/dynamicdns.html"
fi
webadmin_ipv4_address=
"$curr_ipv4"
sed
-i
"
s
|<
p
class=
\"ipaddress\".*|<p
class=
\"ipaddress\"
translate=
\"no\"
>
${curr_ipv4}
</p>
|g" "$webadmin_install_dir/dynamicdns.html"
fi
fi
fi
...
...
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