| 155 | |
| 156 | == Start `deluged` only if mount exists == |
| 157 | |
| 158 | If you have a usb disk drive or network drive that may not be immediately available to the `deluged`. The following additions wait for those mountpoints before starting `deluged`. |
| 159 | |
| 160 | Ensure you have added the correct drive details to `fstab` or equivalent so they are mounted at boot. List the available drive mounts like so: |
| 161 | {{{ |
| 162 | systemctl -t mount |
| 163 | }}} |
| 164 | |
| 165 | Modify the `deluged.service` script by adding the following lines, changing `xyz.mount` for the selected mount from above command: |
| 166 | {{{ |
| 167 | # Unit starts after the following mounts are available. |
| 168 | RequiresMountsFor=xyz.mount |
| 169 | # Unit is stopped when any of these mounts disappear. |
| 170 | BindsTo=xyz.mount |
| 171 | }}} |
| 172 | |