QNAP and scripting

So far I’ve been on a journey trying to get my little QNAP going and finally I have the NODE running fine. In trying to check on its performance using the successrate and earning scripts and am stuck. Everything indicates the QNAP is not allowing scripts to run nor is it allowing me to change the scripts to executable. Correction, it won’t let me change most scripts to executable. I’ve tried logging in as admin and root as well as a normal user.

Anyone have experiences like this? The Q OS is a bit odd to me so I’m struggling a bit. Synology and Ubuntu are a breeze (command line wise) compared to this one…

You can install python from the qnap App Store and then you can run the scripts directly via ssh. At least for me that was always working

I can run Python OK but not successrate.sh or any other .sh script. Normally when you make a file executable with CHMOD, you can do an “ls” and see that it has turned green. On the QNAP, I see an * after the file name. When I try to run the file is says command not found…

And if you mount the qnap volume on your pc and run the script from your pc on the volume path?

You can try to put bash or sh before the path to the script.

bash ./successrate.sh

or

sh ./successrate.sh

Also, if you trying to run the script from the current location and you successfully changed it to be executable (i.e. chmod +x ./successrate.sh), you need to place at least ./ (or absolute path) before the script,

./successrate.sh

Adding bash got me past the first problem I was having but now I get “line 227: syntax error: unexpected end of file”

I used VIM to create a new file using the raw data from github and problems were solved. Thanks again for all your help! You are a great asset to this forum and the overall project.

1 Like