Ejemplo n.º 1
0
    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,
                               manual_page='Monkeysphere')
        self.add(info)

        menu_item = menu.Menu('menu-monkeysphere',
                              info.name,
                              None,
                              info.icon,
                              'monkeysphere:index',
                              parent_url_name='system',
                              advanced=True)
        self.add(menu_item)

        users_and_groups = UsersAndGroups('users-and-groups-monkeysphere',
                                          reserved_usernames=['monkeysphere'])
        self.add(users_and_groups)

        backup_restore = BackupRestore('backup-restore-monkeysphere',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 2
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(
            app_id=self.app_id,
            version=self._version,
            is_essential=True,
            depends=['storage'],
            name=_('Backups'),
            icon='fa-files-o',
            description=_description,
            manual_page='Backups',
            donation_url='https://www.borgbackup.org/support/fund.html')
        self.add(info)

        menu_item = menu.Menu('menu-backups',
                              info.name,
                              None,
                              info.icon,
                              'backups:index',
                              parent_url_name='system')
        self.add(menu_item)

        packages = Packages('packages-backups', ['borgbackup', 'sshfs'])
        self.add(packages)
Ejemplo n.º 3
0
    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,
                               manual_page='Storage')
        self.add(info)

        menu_item = menu.Menu('menu-storage',
                              info.name,
                              None,
                              info.icon,
                              'storage:index',
                              parent_url_name='system')
        self.add(menu_item)

        daemon = Daemon('daemon-udiskie', managed_services[0])
        self.add(daemon)

        # Check every hour for low disk space, every 3 minutes in debug mode
        interval = 180 if cfg.develop else 3600
        glib.schedule(interval, warn_about_low_disk_space)
Ejemplo n.º 4
0
    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,
                               manual_page='Upgrades')
        self.add(info)

        menu_item = menu.Menu('menu-upgrades',
                              info.name,
                              None,
                              info.icon,
                              'upgrades:index',
                              parent_url_name='system')
        self.add(menu_item)

        self._show_new_release_notification()

        # Check every day for setting up apt backport sources, every 3 minutes
        # in debug mode.
        interval = 180 if cfg.develop else 24 * 3600
        glib.schedule(interval, setup_repositories)
Ejemplo n.º 5
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()
        info = app_module.Info(app_id=self.app_id, version=version,
                               name=_('Transmission'),
                               icon_filename='transmission',
                               short_description=_('BitTorrent Web Client'),
                               description=_description,
                               manual_page='Transmission', clients=clients)
        self.add(info)

        menu_item = menu.Menu('menu-transmission', info.name,
                              info.short_description, info.icon_filename,
                              'transmission:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-transmission', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            url='/transmission', clients=info.clients, login_required=True,
            allowed_groups=[group[0]])
        self.add(shortcut)

        firewall = Firewall('firewall-transmission', info.name,
                            ports=['http', 'https'], is_external=True)
        self.add(firewall)

        webserver = Webserver('webserver-transmission', 'transmission-plinth',
                              urls=['https://{host}/transmission'])
        self.add(webserver)

        daemon = Daemon('daemon-transmission', managed_services[0],
                        listen_ports=[(9091, 'tcp4')])
        self.add(daemon)
Ejemplo n.º 6
0
    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,
                               manual_page='Firewall')
        self.add(info)

        menu_item = menu.Menu('menu-firewall',
                              info.name,
                              None,
                              info.icon,
                              'firewall:index',
                              parent_url_name='system')
        self.add(menu_item)

        daemon = Daemon('daemon-firewall', managed_services[0])
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-firewall',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 7
0
    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',
                               short_description=_('Public Visibility'),
                               description=_description,
                               manual_page='PageKite')
        self.add(info)

        menu_item = menu.Menu('menu-pagekite',
                              info.name,
                              info.short_description,
                              info.icon,
                              'pagekite:index',
                              parent_url_name='system')
        self.add(menu_item)

        domain_type = DomainType('domain-type-pagekite',
                                 _('PageKite Domain'),
                                 'pagekite:index',
                                 can_have_certificate=True)
        self.add(domain_type)
Ejemplo n.º 8
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(app_id=self.app_id, version=self._version,
                               is_essential=True, depends=['names'],
                               name=_('Service Discovery'), icon='fa-compass',
                               description=_description,
                               manual_page='ServiceDiscovery')
        self.add(info)

        menu_item = menu.Menu('menu-avahi', info.name, None, info.icon,
                              'avahi:index', parent_url_name='system')
        self.add(menu_item)

        packages = Packages('packages-avahi', ['avahi-daemon', 'avahi-utils'])
        self.add(packages)

        domain_type = DomainType('domain-type-local',
                                 _('Local Network Domain'), 'config:index',
                                 can_have_certificate=False)
        self.add(domain_type)

        firewall = Firewall('firewall-avahi', info.name, ports=['mdns'],
                            is_external=False)
        self.add(firewall)

        daemon = Daemon('daemon-avahi', 'avahi-daemon')
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-avahi',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 9
0
    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=_('General Configuration'),
                               icon='fa-cog',
                               description=_description,
                               manual_page='Configure')
        self.add(info)

        menu_item = menu.Menu('menu-config',
                              _('Configure'),
                              None,
                              info.icon,
                              'config:index',
                              parent_url_name='system')
        self.add(menu_item)

        domain_type = DomainType('domain-type-static',
                                 _('Domain Name'),
                                 'config:index',
                                 can_have_certificate=True)
        self.add(domain_type)

        # Register domain with Name Services module.
        domainname = get_domainname()
        if domainname:
            domain_added.send_robust(sender='config',
                                     domain_type='domain-type-static',
                                     name=domainname,
                                     services='__all__')
Ejemplo n.º 10
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(app_id=self.app_id,
                               version=self._version,
                               is_essential=True,
                               name=_('Secure Shell (SSH) Server'),
                               icon='fa-terminal',
                               description=_description)
        self.add(info)

        menu_item = menu.Menu('menu-ssh',
                              info.name,
                              None,
                              info.icon,
                              'ssh:index',
                              parent_url_name='system')
        self.add(menu_item)

        packages = Packages('packages-ssh', ['openssh-server'])
        self.add(packages)

        firewall = Firewall('firewall-ssh',
                            info.name,
                            ports=['ssh'],
                            is_external=True)
        self.add(firewall)

        daemon = Daemon('daemon-ssh', 'ssh')
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-ssh', **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 11
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(app_id=self.app_id,
                               version=version,
                               name=_('Service Discovery'),
                               icon='fa-compass',
                               description=_description,
                               manual_page='ServiceDiscovery')
        self.add(info)

        menu_item = menu.Menu('menu-avahi',
                              info.name,
                              None,
                              info.icon,
                              'avahi:index',
                              parent_url_name='system')
        self.add(menu_item)

        domain_type = DomainType('domain-type-local',
                                 _('Local Network Domain'),
                                 'config:index',
                                 can_have_certificate=False)
        self.add(domain_type)

        firewall = Firewall('firewall-avahi',
                            info.name,
                            ports=['mdns'],
                            is_external=False)
        self.add(firewall)

        daemon = Daemon('daemon-avahi', managed_services[0])
        self.add(daemon)
Ejemplo n.º 12
0
    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',
                               short_description=_('Certificates'),
                               description=_description,
                               manual_page='LetsEncrypt',
                               donation_url='https://letsencrypt.org/donate/')
        self.add(info)

        menu_item = menu.Menu('menu-letsencrypt', info.name,
                              info.short_description, info.icon,
                              'letsencrypt:index', parent_url_name='system')
        self.add(menu_item)

        backup_restore = BackupRestore('backup-restore-letsencrypt',
                                       **manifest.backup)
        self.add(backup_restore)

        domain_added.connect(on_domain_added)
        domain_removed.connect(on_domain_removed)

        post_module_loading.connect(_certificate_handle_modified)
Ejemplo n.º 13
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(app_id=self.app_id,
                               version=self._version,
                               is_essential=True,
                               name=_('Storage Snapshots'),
                               icon='fa-film',
                               description=_description,
                               manual_page='Snapshots')
        self.add(info)

        menu_item = menu.Menu('menu-snapshot',
                              info.name,
                              None,
                              info.icon,
                              'snapshot:index',
                              parent_url_name='system')
        self.add(menu_item)

        packages = Packages('packages-snapshot', ['snapper'])
        self.add(packages)

        backup_restore = SnapshotBackupRestore('backup-restore-snapshot',
                                               **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 14
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        self.groups = {'vpn': _('Connect to VPN services')}

        info = app_module.Info(app_id=self.app_id,
                               version=self._version,
                               name=_('OpenVPN'),
                               icon_filename='openvpn',
                               short_description=_('Virtual Private Network'),
                               description=_description,
                               manual_page='OpenVPN',
                               clients=manifest.clients)
        self.add(info)

        menu_item = menu.Menu('menu-openvpn',
                              info.name,
                              info.short_description,
                              info.icon_filename,
                              'openvpn:index',
                              parent_url_name='apps')
        self.add(menu_item)

        download_profile = \
            format_lazy(_('<a class="btn btn-primary btn-sm" href="{link}">'
                          'Download Profile</a>'),
                        link=reverse_lazy('openvpn:profile'))
        shortcut = frontpage.Shortcut(
            'shortcut-openvpn',
            info.name,
            short_description=info.short_description,
            icon=info.icon_filename,
            description=info.description + [download_profile],
            configure_url=reverse_lazy('openvpn:index'),
            login_required=True,
            allowed_groups=['vpn'])
        self.add(shortcut)

        packages = Packages('packages-openvpn', ['openvpn', 'easy-rsa'])
        self.add(packages)

        firewall = Firewall('firewall-openvpn',
                            info.name,
                            ports=['openvpn'],
                            is_external=True)
        self.add(firewall)

        daemon = Daemon('daemon-openvpn',
                        'openvpn-server@freedombox',
                        listen_ports=[(1194, 'udp4'), (1194, 'udp6')])
        self.add(daemon)

        users_and_groups = UsersAndGroups('users-and-groups-openvpn',
                                          groups=self.groups)
        self.add(users_and_groups)

        backup_restore = BackupRestore('backup-restore-openvpn',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 15
0
    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'),
                               description=_description,
                               manual_page='Performance',
                               clients=manifest.clients)
        self.add(info)

        menu_item = menu.Menu('menu-performance', info.name,
                              info.short_description, info.icon,
                              'performance:index', parent_url_name='system')
        self.add(menu_item)

        daemon_0 = Daemon('daemon-performance-0', managed_services[0],
                          listen_ports=None)
        self.add(daemon_0)

        daemon_1 = Daemon('daemon-performance-1', managed_services[1],
                          listen_ports=None)
        self.add(daemon_1)

        daemon_2 = Daemon('daemon-performance-2', managed_services[2],
                          listen_ports=None)
        self.add(daemon_2)

        daemon_3 = Daemon('daemon-performance-3', managed_services[3],
                          listen_ports=None)
        self.add(daemon_3)
Ejemplo n.º 16
0
    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',
                               short_description=_('Distributed File Storage'),
                               description=_description)

        self.add(info)

        menu_item = menu.Menu('menu-tahoe', info.name, info.short_description,
                              info.icon_filename, 'tahoe:index',
                              parent_url_name='apps', advanced=True)
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-tahoe', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            description=info.description, url=None,
            configure_url=reverse_lazy('tahoe:index'), login_required=True)
        self.add(shortcut)

        firewall = Firewall('firewall-tahoe', info.name,
                            ports=['tahoe-plinth'], is_external=True)
        self.add(firewall)

        webserver = Webserver('webserver-tahoe', 'tahoe-plinth')
        self.add(webserver)

        daemon = Daemon('daemon-tahoe', managed_services[0])
        self.add(daemon)
Ejemplo n.º 17
0
    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',
                               short_description=_('Public Visibility'),
                               description=_description,
                               manual_page='PageKite')
        self.add(info)

        menu_item = menu.Menu('menu-pagekite', info.name,
                              info.short_description, info.icon,
                              'pagekite:index', parent_url_name='system')
        self.add(menu_item)

        domain_type = DomainType('domain-type-pagekite', _('PageKite Domain'),
                                 'pagekite:index', can_have_certificate=True)
        self.add(domain_type)

        daemon = Daemon('daemon-pagekite', managed_services[0])
        self.add(daemon)

        # Register kite name with Name Services module.
        utils.update_names_module(is_enabled=self.is_enabled())
Ejemplo n.º 18
0
    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'),
                               description=_description,
                               manual_page='Roundcube',
                               clients=manifest.clients)
        self.add(info)

        menu_item = menu.Menu('menu-roundcube', info.name,
                              info.short_description, info.icon_filename,
                              'roundcube:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut('shortcut-roundcube', info.name,
                                      short_description=info.short_description,
                                      icon=info.icon_filename,
                                      url='/roundcube/', clients=info.clients,
                                      login_required=True)
        self.add(shortcut)

        firewall = Firewall('firewall-roundcube', info.name,
                            ports=['http', 'https'], is_external=True)
        self.add(firewall)

        webserver = Webserver('webserver-roundcube', 'roundcube',
                              urls=['https://{host}/roundcube'])
        self.add(webserver)

        backup_restore = BackupRestore('backup-restore-roundcube',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 19
0
    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'),
                               description=_description,
                               manual_page='Infinoted', clients=clients)
        self.add(info)

        menu_item = menu.Menu('menu-infinoted', info.name,
                              info.short_description, info.icon_filename,
                              'infinoted:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-infinoted', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            description=info.description,
            configure_url=reverse_lazy('infinoted:index'),
            clients=info.clients, login_required=False)
        self.add(shortcut)

        firewall = Firewall('firewall-infinoted', info.name,
                            ports=['infinoted-plinth'], is_external=True)
        self.add(firewall)

        daemon = Daemon('daemon-infinoted', managed_services[0],
                        listen_ports=[(6523, 'tcp4'), (6523, 'tcp6')])
        self.add(daemon)
Ejemplo n.º 20
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()
        info = app_module.Info(app_id=self.app_id, version=version,
                               name=_('diaspora*'), icon_filename='diaspora',
                               short_description=_('Federated Social Network'),
                               description=_description, clients=clients)
        self.add(info)

        menu_item = menu.Menu('menu-diaspora', info.name,
                              info.short_description, info.icon_filename,
                              'diaspora:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = Shortcut('shortcut-diaspora', info.name,
                            short_description=info.short_description,
                            icon=info.icon_filename, url=None,
                            clients=info.clients, login_required=True)
        self.add(shortcut)

        firewall = Firewall('firewall-diaspora', info.name,
                            ports=['http', 'https'], is_external=True)
        self.add(firewall)

        webserver = Webserver('webserver-diaspora', 'diaspora-plinth')
        self.add(webserver)

        daemon = Daemon('daemon-diaspora', managed_services[0])
        self.add(daemon)
Ejemplo n.º 21
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(
            app_id=self.app_id, version=self._version, name=_('WireGuard'),
            icon_filename='wireguard',
            short_description=_('Virtual Private Network'),
            description=_description, manual_page='WireGuard',
            clients=manifest.clients,
            donation_url='https://www.wireguard.com/donations/')
        self.add(info)

        menu_item = menu.Menu('menu-wireguard', info.name,
                              info.short_description, info.icon_filename,
                              'wireguard:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-wireguard', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            description=info.description,
            configure_url=reverse_lazy('wireguard:index'), login_required=True,
            clients=info.clients)
        self.add(shortcut)

        packages = Packages('packages-wireguard', ['wireguard'])
        self.add(packages)

        firewall = Firewall('firewall-wireguard', info.name,
                            ports=['wireguard-freedombox'], is_external=True)
        self.add(firewall)
Ejemplo n.º 22
0
    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'),
                               description=_description, manual_page='Privoxy')
        self.add(info)

        menu_item = menu.Menu('menu-privoxy', info.name,
                              info.short_description, info.icon_filename,
                              'privoxy:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-privoxy', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            description=info.description,
            configure_url=reverse_lazy('privoxy:index'), login_required=True)
        self.add(shortcut)

        firewall = Firewall('firewall-privoxy', info.name, ports=['privoxy'],
                            is_external=False)
        self.add(firewall)

        daemon = Daemon('daemon-privoxy', managed_services[0],
                        listen_ports=[(8118, 'tcp4'), (8118, 'tcp6')])
        self.add(daemon)

        users_and_groups = UsersAndGroups('users-and-groups-privoxy',
                                          reserved_usernames=['privoxy'])
        self.add(users_and_groups)
Ejemplo n.º 23
0
    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'),
                               icon='fa-terminal',
                               description=_description)
        self.add(info)

        menu_item = menu.Menu('menu-ssh',
                              info.name,
                              None,
                              info.icon,
                              'ssh:index',
                              parent_url_name='system')
        self.add(menu_item)

        firewall = Firewall('firewall-ssh',
                            info.name,
                            ports=['ssh'],
                            is_external=True)
        self.add(firewall)

        daemon = Daemon('daemon-ssh', managed_services[0])
        self.add(daemon)
Ejemplo n.º 24
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        groups = {'ed2k': _('Download files using eDonkey applications')}

        info = app_module.Info(
            app_id=self.app_id,
            version=version,
            name=_('MLDonkey'),
            icon_filename='mldonkey',
            short_description=_('Peer-to-peer File Sharing'),
            description=_description,
            manual_page='MLDonkey',
            clients=manifest.clients)
        self.add(info)

        menu_item = menu.Menu('menu-mldonkey',
                              info.name,
                              info.short_description,
                              info.icon_filename,
                              'mldonkey:index',
                              parent_url_name='apps')
        self.add(menu_item)

        shortcuts = frontpage.Shortcut(
            'shortcut-mldonkey',
            info.name,
            short_description=info.short_description,
            icon=info.icon_filename,
            url='/mldonkey/',
            login_required=True,
            clients=info.clients,
            allowed_groups=list(groups))
        self.add(shortcuts)

        firewall = Firewall('firewall-mldonkey',
                            info.name,
                            ports=['http', 'https'],
                            is_external=True)
        self.add(firewall)

        webserver = Webserver('webserver-mldonkey',
                              'mldonkey-freedombox',
                              urls=['https://{host}/mldonkey/'])
        self.add(webserver)

        daemon = Daemon('daemon-mldonkey',
                        managed_services[0],
                        listen_ports=[(4080, 'tcp4')])
        self.add(daemon)

        users_and_groups = UsersAndGroups('users-and-groups-mldonkey',
                                          reserved_usernames=[_SYSTEM_USER],
                                          groups=groups)
        self.add(users_and_groups)

        backup_restore = BackupRestore('backup-restore-mldonkey',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 25
0
    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'),
                               description=_description)
        self.add(info)

        menu_item = menu.Menu('menu-bind',
                              info.name,
                              info.short_description,
                              info.icon,
                              'bind:index',
                              parent_url_name='system')
        self.add(menu_item)

        firewall = Firewall('firewall-bind',
                            info.name,
                            ports=['dns'],
                            is_external=False)
        self.add(firewall)

        daemon = Daemon('daemon-bind',
                        managed_services[0],
                        listen_ports=[(53, 'tcp6'), (53, 'udp6'), (53, 'tcp4'),
                                      (53, 'udp4')],
                        alias=managed_services[1])
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-bind',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 26
0
    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'),
                               description=_description, manual_page='Mumble',
                               clients=clients)
        self.add(info)

        menu_item = menu.Menu('menu-mumble', info.name, info.short_description,
                              'mumble', 'mumble:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-mumble', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            description=info.description,
            configure_url=reverse_lazy('mumble:index'), clients=info.clients)
        self.add(shortcut)

        firewall = Firewall('firewall-mumble', info.name,
                            ports=['mumble-plinth'], is_external=True)
        self.add(firewall)

        daemon = Daemon(
            'daemon-mumble', managed_services[0],
            listen_ports=[(64738, 'tcp4'), (64738, 'tcp6'), (64738, 'udp4'),
                          (64738, 'udp6')])
        self.add(daemon)

        users_and_groups = UsersAndGroups('users-and-groups-mumble',
                                          reserved_usernames=['mumble-server'])
        self.add(users_and_groups)
Ejemplo n.º 27
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(
            app_id=self.app_id, version=self._version, depends=['names'],
            name=_('PageKite'), icon='fa-flag',
            short_description=_('Public Visibility'), description=_description,
            manual_page='PageKite',
            donation_url='https://pagekite.net/support/faq/#donate')
        self.add(info)

        menu_item = menu.Menu('menu-pagekite', info.name,
                              info.short_description, info.icon,
                              'pagekite:index', parent_url_name='system')
        self.add(menu_item)

        packages = Packages('packages-pagekite', ['pagekite'])
        self.add(packages)

        domain_type = DomainType('domain-type-pagekite', _('PageKite Domain'),
                                 'pagekite:index', can_have_certificate=True)
        self.add(domain_type)

        daemon = Daemon('daemon-pagekite', self.DAEMON)
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-pagekite',
                                       **manifest.backup)
        self.add(backup_restore)
Ejemplo n.º 28
0
    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',
                               short_description=_('Socks5 Proxy'),
                               description=_description,
                               manual_page='Shadowsocks')
        self.add(info)

        menu_item = menu.Menu('menu-shadowsocks', info.name,
                              info.short_description, info.icon_filename,
                              'shadowsocks:index', parent_url_name='apps')
        self.add(menu_item)

        shortcut = frontpage.Shortcut(
            'shortcut-shadowsocks', info.name,
            short_description=info.short_description, icon=info.icon_filename,
            description=info.description,
            configure_url=reverse_lazy('shadowsocks:index'),
            login_required=True)
        self.add(shortcut)

        firewall = Firewall('firewall-shadowsocks', info.name,
                            ports=['shadowsocks-local-plinth'],
                            is_external=False)
        self.add(firewall)

        daemon = Daemon('daemon-shadowsocks', managed_services[0],
                        listen_ports=[(1080, 'tcp4'), (1080, 'tcp6')])
        self.add(daemon)
Ejemplo n.º 29
0
    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',
                               description=_description,
                               manual_page='Users')
        self.add(info)

        menu_item = menu.Menu('menu-users',
                              info.name,
                              None,
                              info.icon,
                              'users:index',
                              parent_url_name='system')
        self.add(menu_item)

        daemon = Daemon('daemon-users',
                        managed_services[0],
                        listen_ports=[(389, 'tcp4'), (389, 'tcp6')])
        self.add(daemon)

        # Add the admin group
        groups = {'admin': _('Access to all services and system settings')}
        users_and_groups = UsersAndGroups('users-and-groups-admin',
                                          groups=groups)
        self.add(users_and_groups)
Ejemplo n.º 30
0
    def __init__(self):
        """Create components for the app."""
        super().__init__()

        info = app_module.Info(app_id=self.app_id, version=self._version,
                               is_essential=True, name=_('Software Update'),
                               icon='fa-refresh', description=_description,
                               manual_page='Upgrades')
        self.add(info)

        menu_item = menu.Menu('menu-upgrades', info.name, None, info.icon,
                              'upgrades:index', parent_url_name='system')
        self.add(menu_item)

        packages = Packages('packages-upgrades',
                            ['unattended-upgrades', 'needrestart'])
        self.add(packages)

        daemon = RelatedDaemon('related-daemon-upgrades',
                               'freedombox-dist-upgrade')
        self.add(daemon)

        backup_restore = BackupRestore('backup-restore-upgrades',
                                       **manifest.backup)
        self.add(backup_restore)