kantlivelong / OctoPrint-GCodeSystemCommands

Define G-Code commands that execute local system commands.
GNU Affero General Public License v3.0
37 stars 20 forks source link

Requirement to explicitly call sh to execute shell script : should be in config description #20

Open edster99 opened 3 years ago

edster99 commented 3 years ago

What were you doing?

Wanted to execute code

Iniital error was a 'returned 127' resolved by adding absolute path to the shell script /home/pi/OctoPrint/OCTO100.sh (execution properties set to all) Then got an error 2 resolved by adding sh in the gcode system commands to give sh /home/pi/OctoPrint/OCTO100.sh This then executed successfully.

Version of OctoPrint-GCodeSystemCommands

1.0.1

Operating System running OctoPrint

Raspbian 10 buster Octoprint 1.4.0 Octopi 0.17.0 Python 3.7.3

Printer moprodel & used firmware incl. version

Link to octoprint.log with octoprnt.plugins.gcodesystemcommands set to DEBUG

kantlivelong commented 3 years ago

I'm unable to reproduce this. Need logs.

edster99 commented 3 years ago

I'll create them in the morning after 'unfixing :)'

edster99 commented 3 years ago

octoprint.log This is the log where I have the path defined, but not explicitly calling the script using sh.

edster99 commented 3 years ago

No path no sh This is what you get with the default creation of the command returned in the terminal. I will withdraw my request about the full path as you have that implicitly referred to in some of the screen shots.

ruedli commented 2 months ago

I just added a shell script to run. I did three things:

This worked OK, I did NOT have to give it a .sh extension (running octoprint ubuntu server, using dietpi) I did NOT have to add a path to the command I did not need to put /bin/sh in front of the command

Could it be one of these three things I did was forgotten by @edster99 ?

image

OCTO10 executed the script in /usr/local/bin/light (and switched of the light in my enclosre through homeassistant with nodeRed

image

So.... I cannot confirm a bug.