Exercise 1: A Logging Service That Requires a Collector, In Order — Possible Solution ==================================================================== [Unit] Requires=log-collector.service After=log-collector.service Explanation: The exercise specifically says the logging service "should only run if" the log-collector service is available -- this is a genuine hard dependency, not just a nice-to-have, matching the chapter's own definition of Requires= as appropriate "only when the unit truly cannot function at all without the other one." Since the logging service is described as fundamentally dependent on the collector being present, Requires= (not the softer Wants=) is the correct choice here -- if log-collector.service fails to start, systemd should treat the logging service's own startup as a failure too, exactly Requires='s own defined behavior. After=log-collector.service is included separately because, per the chapter's own central point, Requires= alone only controls WHETHER the collector gets started -- it says nothing about ORDER. Without this second line, both units could theoretically be told to start at the same time, with no guarantee the collector is actually up first. The exercise explicitly requires "must not start until after it," which is exactly what the separate After= line guarantees. Both lines are needed together, matching the chapter's own repeated point that whether-to-start and when-to-start are two independent axes. WHY THIS WORKS AS AN ANSWER ------------------------------ This selects Requires= (not Wants=) based on the exercise's own "should only run if" wording matching the chapter's own hard-dependency definition, and explicitly includes the separate After= line with a justification for why Requires= alone wouldn't satisfy the ordering requirement.