openvpn-transmision and wireguard-transmission are two scripts that start OpenVPN or Wireguard and transmission-daemon. If OpenVPN or Wireguard crash or server is not available, the scripts stop transmission-daemon service.
wget https://raw.githubusercontent.com/mapi68/openvpn-wireguard-transmission/master/openvpn-transmission.bash
wget https://raw.githubusercontent.com/mapi68/openvpn-wireguard-transmission/master/wireguard-transmission.bash
chmod +x openvpn-transmission.bash wireguard-transmission.bash
./openvpn-transmission.bash help
./wireguard-transmission.bash help