Managing ZoneControl
====================

Controlling the ZoneControl service
-----------------------------------

ZoneControl comes with scripts and files relevant to the service
management system for the Operating System it is installed on.

Note that ZoneControl does **not** support run-time reloading of its
configuration.

systemd (RHEL/CentOS 7+, Debian 8+, Ubuntu 15.04+)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ZoneControl’s service is called (unsurprisingly) ``zonecontrol.service``
and can be controlled in the normal fashion.

Starting::

    systemctl start zonecontrol.service

Stopping::

    systemctl stop zonecontrol.service

Restarting::

    systemctl restart zonecontrol.service

.. _managing-zonecontrol:

Managing ZoneControl
--------------------

ZoneControl comes with a tool called ``zonecontrol-manage``, which is a
wrapper around the Django
`manage.py <https://docs.djangoproject.com/en/2.2/ref/django-admin/>`__
script.

This script supports all the default commands from Django and some
ZoneControl related ones.

.. _managing-zonecontrol-add-server:

``zonecontrol-manage addserver``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This command can be used to add PowerDNS Authoritative Servers to the
configuration without logging in as an admin to the web-interface. It
can be invoked as follows::

    zonecontrol-manage addserver Server1 https://192.0.2.3:8083 MySecretAPIKey

This will add a new server called “Server1”. This server is connected to
on https://192.0.2.3:8083 and “MySecretAPIKey” is used as the shared
secret to connect.

This command also supports some other options, please refer to the
output of

::

    zonecontrol-manage addserver --help

``zonecontrol-manage runscheduled``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Run all `scheduled tasks <#scheduled-tasks>`__.
