# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Copyright 2025 Tobias Görgens

stop_inhibitor() {
    log "[stop_inhibitor] Stopping systemd inhibitor"

    # Stop the systemd inhibitor we started earlier.
    if [ -n "${TIK_INHIBIT_PID}" ] && kill -0 "${TIK_INHIBIT_PID}" 2>/dev/null; then
        kill "${TIK_INHIBIT_PID}" 2>/dev/null || :;
    fi
    log "[stop_inhibitor] Inhibitor stopped"
}

stop_inhibitor
