• segfault's avatar
    Use BindsTo= and After= in tor-has-bootstrapped systemd units (refs: #16664) · d9ae8bf8
    segfault authored
    Currently, if tor@default.service stops for some reason (either stopped
    manually or unexpectedly), tails-tor-has-boostrapped.target is still
    Using BindsTo= in conjunction with After= ensures that the unit is
    always stopped if the other unit (tor@default.service) is stopped.
    See https://www.freedesktop.org/software/systemd/man/systemd.unit.html#BindsTo=
    This allows us to simplify config/chroot_local-includes/usr/local/sbin/tor-has-bootstrapped,
    which would only have to check if tails-tor-has-bootstrapped.target is active.
    Or, we could get rid of this script altogether, because instead of
    calling the script, applications can just run
        /bin/systemctl --quiet is-active tails-tor-has-bootstrapped.target