Open mylinux909 opened 1 year ago
do you have set the right permissions? sh scripts need:
sudo chmod 0771 /FULL_PATH/local_path_some_local_bash_shell_script.sh
+ your sudo password
and
sudo chown yourUsername:yourUsername /FULL_ PATH/local_path_some_local_bash_shell_script.sh
+ your sudo password
and in top (SECOND LINE) of your script you must specify the environment Variable
PATH=/bin:/usr/bin:/sbin:/usr/sbin
and when you use sh add top of your script (FIRST LINE) the bashism
#!/bin/sh
, and please make sure, that you have the permissions for the sh-File-Path-Dir - means you save your sh in /DIR_NAME/ your sudo user must have the permissions to access this dir. If not you can set
sudo chmod 0770 /FULL_PATH/DIR_NAME/local_path_some_local_bash_shell_script.sh
AND
sudo chown -R yourUsername:yourUsername /FULL_PATH/DIR_NAME/
I'm having the same issue, but on FreeBSD. I suspect the cause is the same.
I have applied all the tips in the 2nd post above.
scott@FreeBSD-VM:~/Downloads $ ls -l distill.io
-rwxrwx--x 1 scott scott 130 Apr 4 11:41 distill.io
scott@FreeBSD-VM:~/Downloads $ cat distill.io
#!/bin/sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
/usr/bin/smartthings devices:commands 20a57e30-f9ea-41a9-b113-08a15a36bad0 switch:on
scott@FreeBSD-VM:~/Downloads $ ls -l /usr/bin/smartthings
lrwxr-xr-x 1 root wheel 81 Apr 3 17:03 /usr/bin/smartthings -> /home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/cli/bin/run
Run program filter not working on Linux Ubuntu 20.04 LTS.
Subject > contains > blah-blah Run Program > local_path_some_local_bash_shell_script.sh
BUT the script is not executed and no error messages.
Please advise how to get this working on Linux. Thank you, Martin