Skip to main content
Manage launchd services.

Functions

launchd.service

Manage the state of launchd managed services.
launchd.service(
    service,
    running=True,
    restarted=False,
    command=None,
)

Examples

from pyinfra.operations import launchd

# Manage a launchd service on macOS
launchd.service(
    name="Ensure ssh is running",
    service="com.openssh.sshd",
    running=True,
)

Build docs developers (and LLMs) love