Page 1 of 1

Execute command parameters.

Posted: Wed Nov 11, 2015 10:20 am
by mec
Hello.
Is it possible to pass command line arguments to a script? I am using deluge, headless on rasp pi.

Example. /home/user/execute_script 'hello world'
Note. Python script. Using the additional 'hello world' causes execute to fail.

The script is the example that logs arguments to syslog.

Help please. Thanks.

Re: Execute command parameters.

Posted: Wed Nov 11, 2015 11:13 am
by Cas
No but just create an intermediate script that does that.

Re: Execute command parameters.

Posted: Wed Nov 11, 2015 11:48 am
by mec
Thanks. That is what I expected. Tried that but calling the my python script from the intermediary causes execute to fail. I can execute the script without issue just not in execute. Permissions look OK. My script requires arguments thought this may be confusing my script.

Re: Execute command parameters.

Posted: Wed Nov 11, 2015 10:28 pm
by Cas
See here for details about scripts: http://dev.deluge-torrent.org/wiki/Plugins/Execute

Re: Execute command parameters.

Posted: Thu Nov 12, 2015 7:39 am
by mec
I had already looked at that page but thanks for the reminder. I still have no luck with the script called from the intermediary. They both have the same permissions. I added logging to both but only see logging for the main script. If I don't use the execute plugin the script completes and logging is as expected.

Is execute allowed to use subprocess call. I.e can it spawn another python subprocess?

Re: Execute command parameters.

Posted: Thu Nov 12, 2015 12:36 pm
by Cas
What is the log output of Execute? Do the test scripts work? Start small and build from there...