mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
use package framework for installing ez-ipupdate
This commit is contained in:
parent
6c214c915c
commit
4978c64bb3
@ -26,6 +26,7 @@ import logging
|
||||
|
||||
from plinth import actions
|
||||
from plinth import cfg
|
||||
from plinth import package
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -45,20 +46,14 @@ def init():
|
||||
|
||||
|
||||
@login_required
|
||||
@package.required('ez-ipupdate')
|
||||
def index(request):
|
||||
"""Serve dynamic DNS page"""
|
||||
|
||||
is_installed = actions.run('dynamicdns', ['get-installed']).strip() \
|
||||
== 'installed'
|
||||
|
||||
if is_installed:
|
||||
index_subsubmenu = subsubmenu
|
||||
else:
|
||||
index_subsubmenu = None
|
||||
index_subsubmenu = subsubmenu
|
||||
|
||||
return TemplateResponse(request, 'dynamicdns.html',
|
||||
{'title': _('dynamicdns'),
|
||||
'is_installed': is_installed,
|
||||
'subsubmenu': index_subsubmenu})
|
||||
|
||||
|
||||
@ -123,6 +118,7 @@ class ConfigureForm(forms.Form):
|
||||
|
||||
|
||||
@login_required
|
||||
@package.required('ez-ipupdate')
|
||||
def configure(request):
|
||||
"""Serve the configuration form"""
|
||||
status = get_status()
|
||||
@ -144,6 +140,7 @@ def configure(request):
|
||||
|
||||
|
||||
@login_required
|
||||
@package.required('ez-ipupdate')
|
||||
def statuspage(request):
|
||||
"""Serve the status page """
|
||||
check_nat = actions.run('dynamicdns', ['get-nat'])
|
||||
|
||||
@ -21,22 +21,8 @@
|
||||
{% load bootstrap %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if is_installed %}
|
||||
|
||||
<h2>DynamicDNS client</h2>
|
||||
<p>If your internet provider changes your IP address periodic (i.e. every 24h) it may be hard for others to find you in the WEB. And for this reason nobody may find the services which are provided by freedombox (like your owncloud). The solution is to assign a DNS name to your IP address and update the DNS name every time your IP is changed by your Internet provider. Dynamic DNS allows you to push your current public IP address to an <a href='http://gnudip2.sourceforge.net/'
|
||||
target='_blank'> gnudip </a> server. Afterwards the Server will assign your personal DNS name with the new IP and if someone from the internet asks for your DNS name he will get your personal IP answered.</p>
|
||||
|
||||
{% else %}
|
||||
|
||||
<h2>DynamicDNS client</h2>
|
||||
|
||||
<p>The Dynamic DNS tool <i>ez-ipupdate</i> is not installed.</p>
|
||||
|
||||
<p>ez-ipupdate comes pre-installed with {{ cfg.box_name }}. On any Debian-based
|
||||
system (such as {{ cfg.box_name }}) you may install it using the command
|
||||
<code>apt-get install ez-ipupdate</code>.</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user