Shell_command not being executed by HA

Please advise what should be done for HA automation to execute the script from Shell_command?
My config.yaml:

shell_command:
  transmission_fin: bash /shell_scripts/transmission_fin.sh

My Automation:

alias: 'Transmission: AutoRemove Finished Torrent'
description: ''
trigger:
  - platform: event
    event_type: transmission_downloaded_torrent
action:
  - service: shell_command.transmission_fin
mode: single

Initially I thought HA has no access to System path above homeassistant directory, so I put a script in HA installation directory and created a subfolder shell_scripts there.
From terminal it works like a charm, but Automation does execute script.
Script is executable with rwxr-xr-x (0755).

Does it execute via the services tab in the interface?

It also may need to have shell_scripts whitelisted, or put it inside the www directory (which is inside the same directory as configuration.yaml is in)

No, it does not execute via Services too.
I tried to Whitelist this directory - did not work out.

Tried to put script into ‘www’ folder

shell_command:
  transmission_fin: bash /config/www/transmission_fin.sh

But it did not work too.

/local/transmission_fin.sh

Does not work either…

My host OS is Ubuntu. I tried full absolute paths, but it didn’t change a thing.
Is this the matter of script or paths? Any workaround?

maybe without the initial /

local/transmission_fin.sh

Also, what is in this script file?

The script file is here:

I tried

local/transmission_fin.sh

with no luck in the end…

How have you specified the SERVER? Could it be a name resolution issue?

By the way you shouldn’t need to use bash to run it, the script specifies which program to run it with.

#!/bin/bash

I tried even without ‘bash’, - no luck.
I think there should not be a problem with name resolution, because I explicitly point SERVER in script like this:

SERVER="192.168.0.3:9091 --auth mylogin:mypassword"