Then we need to somehow define a new systemd unit file that always gets reload or restarted when another (Tor) systemd unit file gets restarted or reloaded.
/lib/systemd/system/tor@default.service is already using:
PartOf=tor.service
ReloadPropagatedFrom=tor.service
So saybe we can extend /lib/systemd/system/tor.service with ExecStartPre=...
systemd unit file drop-in instead.
Btw… The following also stops tor@default.service
.
sudo systemctl stop tor.service
Maybe we shouldn’t tell users to engage with sudo systemctl restart tor@default.service
directly but use sudo systemctl restart tor.service
instead. (And perhaps the .service
can be dropped for simplicity.)