============ Cheat sheets ============ systemd's dependencies ====================== ``A`` has ``X=B`` in its ``[Unit]`` section where ``X`` is one of ``Wants``, ``Requires``, ``Requisite``, ``BindsTo``, ``PartOf``, and ``Upholds``. +--------------------------+--------------+-------------+-------------------------------------------------+ | | ``A`` starts | ``B`` fails | ``B`` stops / restarts | | | | +------------------------+------------------------+ | | | | implicitly | explicitly | +==========================+==============+=============+========================+========================+ | ``Wants`` | ``B`` starts | | | +--------------+-----------+--------------+-------------+------------------------+------------------------+ | ``Requires`` | ``After`` | ``B`` starts | ``A`` fails | | ``A`` stops / restarts | +--------------+-----------+--------------+-------------+------------------------+------------------------+ | ``Requires`` | | ``B`` starts | | | ``A`` stops / restarts | +--------------+-----------+--------------+-------------+------------------------+------------------------+ | ``BindsTo`` | ``After`` | ``B`` starts | ``A`` fails | ``A`` stops / restarts | ``A`` stops / restarts | +--------------+-----------+--------------+-------------+------------------------+------------------------+ | ``BindsTo`` | | ``B`` starts | ``A`` exits | ``A`` stops / restarts | ``A`` stops / restarts | +--------------+-----------+--------------+-------------+------------------------+------------------------+ | ``PartOf`` | | | ``A`` stops / restarts | ``A`` stops / restarts | +--------------------------+--------------+-------------+------------------------+------------------------+ | ``Upholds`` | ``B`` is | | | | | | kept alive | | | | +--------------------------+--------------+-------------+------------------------+------------------------+ ``Requisite``: ``A`` starts normally if ``B`` is already running, fails otherwise.