mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
components: Introduce new component - Packages
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> [sunil: isort all files] [sunil: Remove component in datetime component as managed_packages is empty] [sunil: Minor refactor in minidlna for consistency] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
ff0dc01023
commit
cd4bd17173
@ -12,6 +12,7 @@ from plinth import cfg
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy, is_valid_user_name
|
||||
|
||||
version = 9
|
||||
@ -41,6 +42,9 @@ class ApacheApp(app_module.App):
|
||||
name=_('Apache HTTP Server'))
|
||||
self.add(info)
|
||||
|
||||
packages = Packages('packages-apache', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
web_server_ports = Firewall('firewall-web', _('Web Server'),
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(web_server_ports)
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.config import get_hostname
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.names.components import DomainType
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import domain_added, domain_removed, post_hostname_change
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
@ -65,6 +66,9 @@ class AvahiApp(app_module.App):
|
||||
'avahi:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-avahi', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
domain_type = DomainType('domain-type-local',
|
||||
_('Local Network Domain'), 'config:index',
|
||||
can_have_certificate=False)
|
||||
|
||||
@ -17,6 +17,7 @@ from django.utils.translation import gettext_noop
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, glib, menu
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import api
|
||||
|
||||
@ -49,6 +50,7 @@ class BackupsApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, depends=depends,
|
||||
name=_('Backups'), icon='fa-files-o', description=_description,
|
||||
@ -60,6 +62,9 @@ class BackupsApp(app_module.App):
|
||||
'backups:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-backups', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
# Check every hour (every 3 minutes in debug mode) to perform scheduled
|
||||
# backups.
|
||||
interval = 180 if cfg.develop else 3600
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth import frontpage, menu
|
||||
from plinth.modules.apache.components import Uwsgi, Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -79,6 +80,9 @@ class BepastyApp(app_module.App):
|
||||
clients=manifest.clients)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-bepasty', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-bepasty', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -16,6 +16,7 @@ from plinth import cfg, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -74,6 +75,7 @@ class BindApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('BIND'), icon='fa-globe-w',
|
||||
short_description=_('Domain Name Server'),
|
||||
@ -85,6 +87,9 @@ class BindApp(app_module.App):
|
||||
parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-bind', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-bind', info.name, ports=['dns'],
|
||||
is_external=False)
|
||||
self.add(firewall)
|
||||
|
||||
@ -16,6 +16,7 @@ from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -78,6 +79,9 @@ class CalibreApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-calibre', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-calibre', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules import names
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import domain_added, domain_removed
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
@ -60,6 +61,7 @@ class CockpitApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Cockpit'),
|
||||
icon='fa-wrench', icon_filename='cockpit',
|
||||
@ -81,6 +83,9 @@ class CockpitApp(app_module.App):
|
||||
allowed_groups=['admin'])
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-cockpit', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-cockpit', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -20,6 +20,7 @@ from plinth.modules.coturn.components import TurnConfiguration, TurnConsumer
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -69,6 +70,9 @@ class CoturnApp(app_module.App):
|
||||
parent_url_name='apps')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-coturn', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-coturn', info.name,
|
||||
ports=['coturn-freedombox'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -20,8 +20,6 @@ is_essential = True
|
||||
|
||||
managed_services = ['systemd-timesyncd']
|
||||
|
||||
managed_packages = []
|
||||
|
||||
_description = [
|
||||
_('Network time server is a program that maintains the system time '
|
||||
'in synchronization with servers on the Internet.')
|
||||
@ -65,6 +63,7 @@ class DateTimeApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Date & Time'), icon='fa-clock-o',
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users import add_user_to_share_group
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -69,6 +70,9 @@ class DelugeApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-deluge', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-deluge', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -12,6 +12,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.errors import DomainNotRegisteredError
|
||||
from plinth.modules.apache.components import Webserver, diagnose_url
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
domain_name_file = "/etc/diaspora/domain_name"
|
||||
@ -64,6 +65,7 @@ class DiasporaApp(app_module.App):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
from . import manifest
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('diaspora*'), icon_filename='diaspora',
|
||||
short_description=_('Federated Social Network'),
|
||||
@ -82,6 +84,9 @@ class DiasporaApp(app_module.App):
|
||||
clients=info.clients, login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-diaspora', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-diaspora', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -11,6 +11,7 @@ from plinth import cfg, menu
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.names.components import DomainType
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import domain_added
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
@ -51,6 +52,7 @@ class DynamicDNSApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
name=_('Dynamic DNS Client'), icon='fa-refresh',
|
||||
@ -62,6 +64,9 @@ class DynamicDNSApp(app_module.App):
|
||||
'dynamicdns:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-dynamicdns', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
domain_type = DomainType('domain-type-dynamic',
|
||||
_('Dynamic Domain Name'), 'dynamicdns:index',
|
||||
can_have_certificate=True)
|
||||
|
||||
@ -21,6 +21,7 @@ from plinth.modules.coturn.components import TurnConfiguration, TurnConsumer
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import (domain_added, post_hostname_change,
|
||||
pre_hostname_change)
|
||||
from plinth.utils import format_lazy
|
||||
@ -67,6 +68,7 @@ class EjabberdApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('ejabberd'), icon_filename='ejabberd',
|
||||
short_description=_('Chat Server'),
|
||||
@ -88,6 +90,9 @@ class EjabberdApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-ejabberd', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-ejabberd', info.name,
|
||||
ports=['xmpp-client', 'xmpp-server',
|
||||
'xmpp-bosh'], is_external=True)
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth import app as app_module
|
||||
from plinth import cfg, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import Version, format_lazy, import_from_gi
|
||||
|
||||
from . import manifest
|
||||
@ -62,6 +63,7 @@ class FirewallApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Firewall'),
|
||||
icon='fa-shield', description=_description,
|
||||
@ -72,6 +74,9 @@ class FirewallApp(app_module.App):
|
||||
'firewall:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-firewall', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
daemon = Daemon('daemon-firewall', managed_services[0])
|
||||
self.add(daemon)
|
||||
|
||||
@ -129,8 +134,8 @@ def ignore_dbus_error(dbus_error=None, service_error=None):
|
||||
if parts[0] != 'GDBus.Error':
|
||||
raise
|
||||
|
||||
if (dbus_error and parts[1].strip() == 'org.freedesktop.DBus.Error.' +
|
||||
dbus_error):
|
||||
if (dbus_error and parts[1].strip()
|
||||
== 'org.freedesktop.DBus.Error.' + dbus_error):
|
||||
logger.error('Firewalld is not running.')
|
||||
pass
|
||||
elif (service_error and parts[2].strip() == service_error):
|
||||
|
||||
@ -16,6 +16,7 @@ from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
from .forms import is_repo_url
|
||||
@ -73,6 +74,9 @@ class GitwebApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-gitweb', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-gitweb', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.i2p.resources import FAVORITES
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -77,6 +78,9 @@ class I2PApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-i2p', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-i2p-web', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -64,6 +65,9 @@ class IkiwikiApp(app_module.App):
|
||||
|
||||
self.refresh_sites()
|
||||
|
||||
packages = Packages('packages-ikiwiki', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-ikiwiki', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -12,6 +12,7 @@ from plinth import cfg, frontpage, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -42,6 +43,7 @@ class InfinotedApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('infinoted'), icon_filename='infinoted',
|
||||
short_description=_('Gobby Server'),
|
||||
@ -63,6 +65,9 @@ class InfinotedApp(app_module.App):
|
||||
clients=info.clients, login_required=False)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-infinoted', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-infinoted', info.name,
|
||||
ports=['infinoted-plinth'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -12,6 +12,7 @@ from plinth import app as app_module
|
||||
from plinth import frontpage, menu
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.web_server import StaticFiles
|
||||
|
||||
from . import manifest
|
||||
@ -40,6 +41,7 @@ class JSXCApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('JSXC'), icon_filename='jsxc',
|
||||
short_description=_('Chat Client'),
|
||||
@ -59,6 +61,9 @@ class JSXCApp(app_module.App):
|
||||
clients=info.clients)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-jsxc', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-jsxc', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -17,6 +17,7 @@ from plinth.modules import names
|
||||
from plinth.modules.apache.components import diagnose_url
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.names.components import DomainType
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import domain_added, domain_removed, post_module_loading
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
@ -60,6 +61,7 @@ class LetsEncryptApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
name=_('Let\'s Encrypt'), icon='fa-lock',
|
||||
@ -74,6 +76,9 @@ class LetsEncryptApp(app_module.App):
|
||||
'letsencrypt:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-letsencrypt', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-letsencrypt',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
@ -21,6 +21,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.coturn.components import TurnConfiguration, TurnConsumer
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy, is_non_empty_file
|
||||
|
||||
from . import manifest
|
||||
@ -72,6 +73,7 @@ class MatrixSynapseApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('Matrix Synapse'),
|
||||
icon_filename='matrixsynapse', short_description=_('Chat Server'),
|
||||
@ -92,6 +94,9 @@ class MatrixSynapseApp(app_module.App):
|
||||
clients=info.clients, login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-matrixsynapse', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-matrixsynapse', info.name,
|
||||
ports=['matrix-synapse-plinth'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -15,6 +15,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -74,6 +75,9 @@ class MediaWikiApp(app_module.App):
|
||||
clients=info.clients, login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-mediawiki', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-mediawiki', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -57,6 +58,7 @@ class MinetestApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('Minetest'),
|
||||
icon_filename='minetest', short_description=_('Block Sandbox'),
|
||||
@ -78,6 +80,9 @@ class MinetestApp(app_module.App):
|
||||
login_required=False)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-minetest', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-minetest', info.name,
|
||||
ports=['minetest-plinth'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -11,6 +11,7 @@ from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import Version
|
||||
|
||||
from . import manifest
|
||||
@ -61,28 +62,34 @@ class MiniDLNAApp(app_module.App):
|
||||
parent_url_name='apps',
|
||||
icon=info.icon_filename,
|
||||
)
|
||||
firewall = Firewall('firewall-minidlna', info.name, ports=['minidlna'],
|
||||
is_external=False)
|
||||
webserver = Webserver('webserver-minidlna', 'minidlna-freedombox',
|
||||
urls=['http://localhost:8200/'])
|
||||
self.add(menu_item)
|
||||
|
||||
shortcut = frontpage.Shortcut('shortcut-minidlna', info.name,
|
||||
short_description=info.short_description,
|
||||
description=info.description,
|
||||
icon=info.icon_filename,
|
||||
url='/_minidlna/', login_required=True,
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-minidlna', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-minidlna', info.name, ports=['minidlna'],
|
||||
is_external=False)
|
||||
self.add(firewall)
|
||||
|
||||
webserver = Webserver('webserver-minidlna', 'minidlna-freedombox',
|
||||
urls=['http://localhost:8200/'])
|
||||
self.add(webserver)
|
||||
|
||||
daemon = Daemon('daemon-minidlna', managed_services[0])
|
||||
self.add(daemon)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-minidlna',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
self.add(menu_item)
|
||||
self.add(webserver)
|
||||
self.add(firewall)
|
||||
self.add(shortcut)
|
||||
self.add(daemon)
|
||||
|
||||
users_and_groups = UsersAndGroups('users-and-groups-minidlna',
|
||||
groups=groups)
|
||||
self.add(users_and_groups)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users import add_user_to_share_group
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -73,6 +74,9 @@ class MLDonkeyApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcuts)
|
||||
|
||||
packages = Packages('packages-mldonkey', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-mldonkey', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -9,6 +9,7 @@ from plinth import app as app_module
|
||||
from plinth import menu
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -46,6 +47,7 @@ class MonkeysphereApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Monkeysphere'), icon='fa-certificate',
|
||||
description=_description,
|
||||
@ -57,6 +59,9 @@ class MonkeysphereApp(app_module.App):
|
||||
advanced=True)
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-monkeysphere', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
users_and_groups = UsersAndGroups('users-and-groups-monkeysphere',
|
||||
reserved_usernames=['monkeysphere'])
|
||||
self.add(users_and_groups)
|
||||
|
||||
@ -17,6 +17,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import Version
|
||||
|
||||
from . import manifest
|
||||
@ -48,6 +49,7 @@ class MumbleApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('Mumble'),
|
||||
icon_filename='mumble', short_description=_('Voice Chat'),
|
||||
@ -67,6 +69,9 @@ class MumbleApp(app_module.App):
|
||||
configure_url=reverse_lazy('mumble:index'), clients=info.clients)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-mumble', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-mumble', info.name,
|
||||
ports=['mumble-plinth'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -12,6 +12,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import daemon, kvstore, menu, network
|
||||
from plinth.package import Packages
|
||||
|
||||
version = 1
|
||||
|
||||
@ -57,6 +58,7 @@ class NetworksApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Networks'),
|
||||
icon='fa-signal', description=_description,
|
||||
@ -67,6 +69,9 @@ class NetworksApp(app_module.App):
|
||||
'networks:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-networks', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
def diagnose(self):
|
||||
"""Run diagnostics and return the results."""
|
||||
results = super().diagnose()
|
||||
|
||||
@ -15,6 +15,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -81,6 +82,9 @@ class OpenVPNApp(app_module.App):
|
||||
allowed_groups=['vpn'])
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-openvpn', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-openvpn', info.name, ports=['openvpn'],
|
||||
is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -11,6 +11,7 @@ from plinth import cfg, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.names.components import DomainType
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest, utils
|
||||
@ -60,6 +61,7 @@ class PagekiteApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, depends=depends,
|
||||
name=_('PageKite'), icon='fa-flag',
|
||||
@ -73,6 +75,9 @@ class PagekiteApp(app_module.App):
|
||||
'pagekite:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-pagekite', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
domain_type = DomainType('domain-type-pagekite', _('PageKite Domain'),
|
||||
'pagekite:index', can_have_certificate=True)
|
||||
self.add(domain_type)
|
||||
|
||||
@ -9,6 +9,7 @@ from plinth import app as app_module
|
||||
from plinth import menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -42,6 +43,7 @@ class PerformanceApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Performance'), icon='fa-bar-chart',
|
||||
short_description=_('System Monitoring'),
|
||||
@ -55,6 +57,9 @@ class PerformanceApp(app_module.App):
|
||||
'performance:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-performance', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-performance',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.apache.components import diagnose_url
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -52,6 +53,7 @@ class PrivoxyApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('Privoxy'),
|
||||
icon_filename='privoxy', short_description=_('Web Proxy'),
|
||||
@ -71,6 +73,9 @@ class PrivoxyApp(app_module.App):
|
||||
configure_url=reverse_lazy('privoxy:index'), login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-privoxy', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-privoxy', info.name, ports=['privoxy'],
|
||||
is_external=False)
|
||||
self.add(firewall)
|
||||
|
||||
@ -17,6 +17,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.letsencrypt.components import LetsEncrypt
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -56,6 +57,7 @@ class QuasselApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Quassel'), icon_filename='quassel',
|
||||
short_description=_('IRC Client'),
|
||||
@ -76,6 +78,9 @@ class QuasselApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-quassel', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-quassel', info.name,
|
||||
ports=['quassel-plinth'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -15,6 +15,7 @@ from plinth.modules.apache.components import Uwsgi, Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import Version, format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -51,6 +52,7 @@ class RadicaleApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Radicale'), icon_filename='radicale',
|
||||
short_description=_('Calendar and Addressbook'),
|
||||
@ -71,6 +73,9 @@ class RadicaleApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-radicale', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-radicale', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -11,6 +11,7 @@ from plinth import frontpage, menu
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import Version
|
||||
|
||||
from . import manifest
|
||||
@ -51,6 +52,7 @@ class RoundcubeApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Roundcube'), icon_filename='roundcube',
|
||||
short_description=_('Email Client'),
|
||||
@ -71,6 +73,9 @@ class RoundcubeApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-roundcube', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-roundcube', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -18,6 +18,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -79,6 +80,9 @@ class SambaApp(app_module.App):
|
||||
login_required=True, allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-samba', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-samba', info.name, ports=['samba'])
|
||||
self.add(firewall)
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.apache.components import Uwsgi, Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -65,6 +66,9 @@ class SearxApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-searx', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-searx', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import menu, module_loader
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -41,6 +42,7 @@ class SecurityApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Security'),
|
||||
icon='fa-lock', manual_page='Security')
|
||||
@ -50,6 +52,9 @@ class SecurityApp(app_module.App):
|
||||
'security:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-security', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-security',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
@ -9,6 +9,7 @@ from plinth import app as app_module
|
||||
from plinth import frontpage, menu
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -33,6 +34,7 @@ class ShaarliApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Shaarli'), icon_filename='shaarli',
|
||||
short_description=_('Bookmarks'),
|
||||
@ -52,6 +54,9 @@ class ShaarliApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-shaarli', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-shaarli', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -12,6 +12,7 @@ from plinth import cfg, frontpage, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -47,6 +48,7 @@ class ShadowsocksApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Shadowsocks'),
|
||||
icon_filename='shadowsocks',
|
||||
@ -68,6 +70,9 @@ class ShadowsocksApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-shadowsocks', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-shadowsocks', info.name,
|
||||
ports=['shadowsocks-local-plinth'],
|
||||
is_external=False)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth import app as app_module
|
||||
from plinth import menu
|
||||
from plinth.modules import storage
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -52,6 +53,7 @@ class SnapshotApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Storage Snapshots'), icon='fa-film',
|
||||
description=_description,
|
||||
@ -62,6 +64,9 @@ class SnapshotApp(app_module.App):
|
||||
'snapshot:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-snapshot', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
backup_restore = SnapshotBackupRestore('backup-restore-snapshot',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
@ -15,6 +15,7 @@ from plinth import menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -44,6 +45,7 @@ class SSHApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Secure Shell (SSH) Server'),
|
||||
@ -54,6 +56,9 @@ class SSHApp(app_module.App):
|
||||
'ssh:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-ssh', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-ssh', info.name, ports=['ssh'],
|
||||
is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth.package import Packages
|
||||
|
||||
version = 1
|
||||
|
||||
@ -29,11 +30,15 @@ class SSOApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, depends=depends,
|
||||
name=_('Single Sign On'))
|
||||
self.add(info)
|
||||
|
||||
packages = Packages('packages-sso', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
|
||||
def setup(helper, old_version=None):
|
||||
"""Install the required packages"""
|
||||
|
||||
@ -16,6 +16,7 @@ from plinth import app as app_module
|
||||
from plinth import cfg, glib, menu
|
||||
from plinth.errors import ActionError, PlinthError
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest, udisks2
|
||||
@ -49,6 +50,7 @@ class StorageApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Storage'),
|
||||
icon='fa-hdd-o', description=_description,
|
||||
@ -59,6 +61,9 @@ class StorageApp(app_module.App):
|
||||
'storage:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-storage', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-storage',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users import add_user_to_share_group
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -80,6 +81,9 @@ class SyncthingApp(app_module.App):
|
||||
allowed_groups=list(self.groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-syncthing', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-syncthing-web', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -16,6 +16,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules.apache.components import Webserver, diagnose_url
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -58,6 +59,7 @@ class TahoeApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Tahoe-LAFS'),
|
||||
icon_filename='tahoe-lafs',
|
||||
@ -78,6 +80,9 @@ class TahoeApp(app_module.App):
|
||||
configure_url=reverse_lazy('tahoe:index'), login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-tahoe', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-tahoe', info.name,
|
||||
ports=['tahoe-plinth'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -17,6 +17,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.names.components import DomainType
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.signals import domain_added, domain_removed
|
||||
|
||||
from . import manifest, utils
|
||||
@ -51,6 +52,7 @@ class TorApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Tor'), icon_filename='tor',
|
||||
short_description=_('Anonymity Network'),
|
||||
@ -64,6 +66,9 @@ class TorApp(app_module.App):
|
||||
parent_url_name='apps')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-tor', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
domain_type = DomainType('domain-type-tor', _('Tor Onion Service'),
|
||||
'tor:index', can_have_certificate=False)
|
||||
self.add(domain_type)
|
||||
|
||||
@ -16,6 +16,7 @@ from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users import add_user_to_share_group
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -49,6 +50,7 @@ class TransmissionApp(app_module.App):
|
||||
groups = {
|
||||
'bit-torrent': _('Download files using BitTorrent applications')
|
||||
}
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('Transmission'),
|
||||
icon_filename='transmission',
|
||||
@ -70,6 +72,9 @@ class TransmissionApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-transmission', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-transmission', info.name,
|
||||
ports=['http', 'https',
|
||||
'transmission-client'], is_external=True)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import Version, format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -74,6 +75,9 @@ class TTRSSApp(app_module.App):
|
||||
allowed_groups=list(groups))
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-ttrss', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-ttrss', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -17,6 +17,7 @@ from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, glib, kvstore, menu
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.package import Packages
|
||||
|
||||
from . import manifest
|
||||
|
||||
@ -73,6 +74,7 @@ class UpgradesApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential, name=_('Update'),
|
||||
icon='fa-refresh', description=_description,
|
||||
@ -83,6 +85,9 @@ class UpgradesApp(app_module.App):
|
||||
'upgrades:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-upgrades', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
backup_restore = BackupRestore('backup-restore-upgrades',
|
||||
**manifest.backup)
|
||||
self.add(backup_restore)
|
||||
|
||||
@ -13,6 +13,7 @@ from plinth import actions
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, menu
|
||||
from plinth.daemon import Daemon
|
||||
from plinth.package import Packages
|
||||
|
||||
from .components import UsersAndGroups
|
||||
|
||||
@ -60,6 +61,7 @@ class UsersApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
is_essential=is_essential,
|
||||
name=_('Users and Groups'), icon='fa-users',
|
||||
@ -70,6 +72,9 @@ class UsersApp(app_module.App):
|
||||
'users:index', parent_url_name='system')
|
||||
self.add(menu_item)
|
||||
|
||||
packages = Packages('packages-users', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
daemon = Daemon('daemon-users', managed_services[0],
|
||||
listen_ports=[(389, 'tcp4'), (389, 'tcp6')])
|
||||
self.add(daemon)
|
||||
|
||||
@ -9,6 +9,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, frontpage, menu
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy, import_from_gi
|
||||
|
||||
from . import manifest, utils
|
||||
@ -45,6 +46,7 @@ class WireguardApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(
|
||||
app_id=self.app_id, version=version, name=_('WireGuard'),
|
||||
icon_filename='wireguard',
|
||||
@ -67,6 +69,9 @@ class WireguardApp(app_module.App):
|
||||
clients=info.clients)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-wireguard', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-wireguard', info.name,
|
||||
ports=['wireguard-freedombox'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -12,6 +12,7 @@ from plinth.daemon import Daemon
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -85,6 +86,9 @@ class WordPressApp(app_module.App):
|
||||
url='/wordpress/', clients=info.clients)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-wordpress', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-wordpress', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -14,6 +14,7 @@ from plinth import cfg, frontpage, menu
|
||||
from plinth.modules.apache.components import Webserver
|
||||
from plinth.modules.backups.components import BackupRestore
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
@ -58,6 +59,7 @@ class ZophApp(app_module.App):
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
super().__init__()
|
||||
|
||||
info = app_module.Info(app_id=self.app_id, version=version,
|
||||
name=_('Zoph'), icon_filename='zoph',
|
||||
short_description=_('Photo Organizer'),
|
||||
@ -77,6 +79,9 @@ class ZophApp(app_module.App):
|
||||
login_required=True)
|
||||
self.add(shortcut)
|
||||
|
||||
packages = Packages('packages-zoph', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
firewall = Firewall('firewall-zoph', info.name,
|
||||
ports=['http', 'https'], is_external=True)
|
||||
self.add(firewall)
|
||||
|
||||
@ -13,13 +13,21 @@ import apt.cache
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy
|
||||
|
||||
from plinth import actions
|
||||
from plinth import actions, app
|
||||
from plinth.errors import ActionError
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Packages(app.FollowerComponent):
|
||||
"""Component to manage the packages of an app."""
|
||||
|
||||
def __init__(self, component_id, packages):
|
||||
self.component_id = component_id
|
||||
self.packages = packages
|
||||
|
||||
|
||||
class PackageException(Exception):
|
||||
"""A package operation has failed."""
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user