Failure running commands via extcommands.xml
Raspberry Pi 3
Repetier Server 0.80.0 (no modifications)
I've scoured documentation and can't seem to figure out how to run commands via extcommands.xml. As a simple test, I created a bash script that simply echoes a text string to a file in the /var/lib/Repetier-Server/database directory, but when trying to execute from the Repetier Server webpage, nothing happens. The script DOES execute correctly via the CLI.
I've set the test.sh script to executable and changed ownership to repetierserver.dialout and made the script executable.
I've added the following to extcommands.xml (and restarted):
Repetier Server 0.80.0 (no modifications)
I've scoured documentation and can't seem to figure out how to run commands via extcommands.xml. As a simple test, I created a bash script that simply echoes a text string to a file in the /var/lib/Repetier-Server/database directory, but when trying to execute from the Repetier Server webpage, nothing happens. The script DOES execute correctly via the CLI.
I've set the test.sh script to executable and changed ownership to repetierserver.dialout and made the script executable.
I've added the following to extcommands.xml (and restarted):
<command>
<name>Test</name>
<execute>/var/lib/Repetier-Server/database/test.sh</execute>
</command>
To be thorough, I also replaced the above with this:
<command>
<name>Test</name>
<execute>sudo /var/lib/Repetier-Server/database/test.sh</execute>
</command>
No difference.
What am I missing?
Comments
What exactly is the test.sh content? You execute it from shell with a different working directory then when server starts it so it might be an error in the script that tries to write somewhere else.
Contents of test.sh:
Contents of extcommands.xml:
The file test.sh is executable by all, and file.txt is writable by all.
if I execute test.sh using sudo -u repetierserver, it succeeds.
I have added repetierserver to the sudoers file with ALL permissions (merely as a test) and the only way I can get it to succeed is by issuing the command via the terminal.
Thanks for the help!