Use BindsTo= and After= in tor-has-bootstrapped systemd units (refs: #16664)
Currently, if email@example.com stops for some reason (either stopped manually or unexpectedly), tails-tor-has-boostrapped.target is still active. Using BindsTo= in conjunction with After= ensures that the unit is always stopped if the other unit (firstname.lastname@example.org) 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 themselves.
Showing with 8 additions and 9 deletions