I found plenty of topics on this issue, but unfortunately I did not succeed to make my script working.... The end of line are correct (LF), I changed the owner to root (for your information, Domoticz is installed in a Synology NAS), and the execution through SSH is working correctly (either is normal user or root).
Code: Select all
-rwxrwxrwx 1 root root 1654 Jul 17 20:51 SynoHomeMode.sh
Code: Select all
2022-07-18 09:07:50.383 Status: Executing script: /volume1/domoticz/var/scripts/SynoHomeMode.sh#enable
2022-07-18 09:07:50.385 Error: Error executing script command (/volume1/domoticz/var/scripts/SynoHomeMode.sh#enable). returned: 32512
Code: Select all
2022-07-18 09:25:45.947 Status: User: USER1 initiated a switch command (154/dummy/On)
2022-07-18 09:25:46.202 Status: Executing script: /volume1/domoticz/var/scripts/SynoHomeMode.sh
2022-07-18 09:25:46.293 Error: Error executing script command (/volume1/domoticz/var/scripts/SynoHomeMode.sh). returned: 256
thanks a lot for your help
EDIT:
I also forgot to mention that I gave a try to have an intermediate script (in LUA):
Code: Select all
os.execute ('(/volume1/domoticz/var/scripts/SynoHomeMode.sh > /dev/null)&')
Code: Select all
2022-07-18 09:36:35.592 Status: Executing script: /volume1/domoticz/var/scripts/SynoHomeMode_OFF.lua#
2022-07-18 09:36:35.595 Error: Error executing script command (/volume1/domoticz/var/scripts/SynoHomeMode_OFF.lua#). returned: 32512
Code: Select all
2022-07-18 09:50:05.292 Status: User: USER1 initiated a switch command (154/dummy/On)
2022-07-18 09:49:54.325 Status: Executing script: /volume1/domoticz/var/scripts/SynoHomeMode_OFF.lua
2022-07-18 09:49:54.327 Error: Error executing script command (/volume1/domoticz/var/scripts/SynoHomeMode_OFF.lua). returned: 512