wget does not seem to support interface scoping for IPv6 addresses. For
example, http_proxy=http://[fe80::babe:ff:ffff:babe%eth0]:8118/ . Curl
supports this.
This fixes most of the failures for IPv6 related addresses. Hide the
last failure as there does not seem to be a proper fix from OS level:
when using link local addresses, if a hostname is resolved to IPv6 link
local address, it is not scoped to that interface. It can't properly be
used by any tool then.
In case of start/stop/restart/reload and to check whether service is
running, fallback to sysvinit scripts when systemd is not running. This
happens inside a chroot environment when setup of essential components
is happening.
Some of the important modules such as php5, cgi and authnz_ldap are
enabled by default in freedombox-setup. However, when installing
ikiwiki we still restart the apache2 web server. This patch fixes that
by restart or reloading only when the corresponding module/config/site
is not already in the state required.
- Helper for checking whether a port is being listened on.
- Helper for checking whether a URL is accessible.
- Helper for checking whether a URL is accessible with all possible IPs
and machine names.
- Helper for checking whether it is possible to connect to a port.
- 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.
- Merge actions/pagekite_util.py into plinth/modules/pagekite/util.py.
- Rename plinth/modules/pagekite/util.py to utils.py.
- Add python-augeus as dependency.
- Move actions/util.py to plinth/action_utils.py and update services
that use it.
- Rename _run() method to run() as it is being used publicly.
- Import the utils in a more conventional manner.
- Move all python2 bits to python3.