diff options
author | Aleksei <alex3kov@zoho.com> | 2024-12-02 15:33:30 +0300 |
---|---|---|
committer | Aleksei <alex3kov@zoho.com> | 2024-12-02 15:33:30 +0300 |
commit | 5b700261e734b10bd1bdbf4b71e51a5bf23c0493 (patch) | |
tree | 90f37de7743b0f79fdc6aa3023638775a50df4f7 | |
parent | bda2ecdc91cb6d7354fba3a388dc2f1da6d2c61c (diff) |
-rw-r--r-- | shellconfig_functions.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shellconfig_functions.sh b/shellconfig_functions.sh index f722093..fe3feff 100644 --- a/shellconfig_functions.sh +++ b/shellconfig_functions.sh @@ -77,15 +77,15 @@ torrents() { transmission-remote --unix-socket /dev/shm/.transmission.socket $@ } torrentsadd_all_in_tmp() { + systemctl --quiet is-active transmission.service || { + printf "transmission is not running\n" + return 1 + } mv /dev/shm/*.torrent /tmp/ ls -1 /tmp/*.torrent || return 1 detox /tmp/*.torrent for t in /tmp/*.torrent; do torrents -a $t - [ $? -ne 0 ] && { - printf "Error adding torrent, is transmission running?\n" - continue - } rm $t done } |