mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
components: Add docstrings & tutorial for Packages
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> [sunil: Include the new component reference in the components index] [sunil: Minor changes to component doc string] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
6e68614e21
commit
53fbaf27f2
4 files changed
+54
-4
No files matched your search
@@ -112,6 +112,36 @@ the daemon. The final argument is the list of ports that this daemon listens on.
|
||||
This information is used to check if the daemon is listening on the expected
|
||||
ports when the user requests diagnostic tests on the app.
|
||||
|
||||
Package management
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Transmission server is installed through a set of packages fetched from Debian
|
||||
package repositories. The packages required for this are passed on to a
|
||||
:class:`~plinth.package.Packages` component which takes care of installing,
|
||||
upgrading and uninstalling the Debian packages. An app might require one or more
|
||||
Debian packages to be installed.
|
||||
|
||||
.. code-block:: python3
|
||||
:caption: ``__init__.py``
|
||||
|
||||
from plinth.package import Packages
|
||||
|
||||
managed_packages = ['transmission-daemon']
|
||||
|
||||
class TransmissionApp(app_module.App):
|
||||
...
|
||||
|
||||
def __init__(self):
|
||||
...
|
||||
|
||||
packages = Packages('packages-transmission', managed_packages)
|
||||
self.add(packages)
|
||||
|
||||
The first argument uniquely identifies this instance of the `Packages`
|
||||
component. Choose an appropriate unique identifier if your app has multiple
|
||||
`Packages` components. The second argument is a list of Debian packages that
|
||||
this component is responsible for.
|
||||
|
||||
Managing web server configuration
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
Reference in new issue
Block a user