Score:0

qBittorrent does not run external shell script

ph flag
Jim

I set qBittorrent-nox to run a shell script after completing a download, but nothing happens. If I change Run external program on torrent completion to a built-in command (say mv "%F" "%F-copy"), then it runs fine.

The shell script basically does the same thing:

path=$1
mv "$path" "$path-copy"

I put the shell script under /usr/local/bin/movefile, and set owner to root and permission to 755. Using sudo -u as the user running qBittorrent-nox, running command movfile "/home/qbuser/downloads/completed/123.file" does move 123.file to 123.file-copy

However, if I change Run external program on torrent completion to movfile "%F", nothing happens.

What might have I missed?

ru flag
@waltinator Your comment is **not relevant** to the question. Many of your comments seem to be canned comments as well, so please update whatever mechanism you use for your comments to be less abrasive in general, as well as know *when* to actually post a comment or not as comments like this one you just posted here are not relevant nor helpful.
Score:0
ph flag
Jim

Turned out I'm using it wrong. When running an external program, qBittorrent does not spawn a shell. Had to change the external program to bash then call my shell script (/usr/bin/bash /usr/local/bin/movfile "%F").

hr flag
Did you try adding a **shebang** to your script (`#! /bin/sh` should be sufficient, since it doesn't appear to use any bash-specific syntax)? I suspect that would allow you to use your `movfile` command directly, as you originally wanted
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.