Unrar for Transmission

I hav a script on my qnap server that automatically unrar torrents and it works well, however it wont work on my Vero4k+.
Its not a permission issue since the script can create files with the touch command.
It seems like it doesn’t like the line:
FIND_RESULTS=$FIND_PATH -maxdepth 3 -iname "*.rar"
Is there a reason why something like that line wont work on osmc?

Blockquote
ay 16 17:29:00 osmc transmission-daemon[22397]: + IFS=$\n
May 16 17:29:00 osmc transmission-daemon[22397]: + unset RAR_FILES i
May 16 17:29:00 osmc transmission-daemon[22397]: + /usr/bi /fi d -maxdepth 3 -iname *.rar
May 16 17:29:00 osmc transmission-daemon[22397]: /home/osmc/.config/transmission-daemon/scripts/unrar_unzip_script.sh: 1: /home/osmc/.config/transmission-daemon/scripts/unrar_unzip_script.sh: /usr/bi: not found
May 16 17:29:00 osmc transmission-daemon[22397]: + FIND_RESULTS=
May 16 17:29:00 osmc transmission-daemon[22397]: + unset IFS
May 16 17:29:00 osmc transmission-daemon[22397]: + unset FIND_RESULTS

You’ll need to check why it’s not /usr/bin/find

I changed the first line in the script from:

#!/bin/sh

to

#!/bin/bash

and that solved the problem.

You could just enable:
https://kodi.tv/addon/virtual-filesystem/rar-archive-support