- Use webserver action utilites.
- Move status getting to module __init__.py so that it can be turned
into an API in future for further simplificaiton.
- Apply this to other modules too in future commits.
- To check whether a service is running does not require root
privileges. This can directly be done from a module without any
action.
- Since actions are allowed to be run using sudo, introducing
unnecessary sub-commands increases attack surface.
- Simple functions calls are unnecessarily being converted to command
line invocations and involve parsing response.
- There is a lot of repeated code because of this that can be
eliminated.
- To generalize this, we need to make all non-root system operations
directly from module instead of delegating to action commands.
We should use on_install setups as sparingly as possible. We don't get
callbacks in cases where package is already installed. Until we
implement our versioned setup mechanism, doing some idempotent setup()
during enable() is much safer.
- Updated comments
- Start the daemon before enabling Apache configuration.
- Warn the user about editing the Apache configuration for Deluge.
- Other minor updates.
- There could be multiple applications for the same functions. Although
in the interface we should we show generic names like 'BitTorrent', we
could use specific names in the backend.
- There is already a bittorrent client: Transmission.