Execute command parameters.

Suggest, post, or discuss plugins for Deluge
mec
New User
New User
Posts: 3
Joined: Wed Nov 11, 2015 8:23 am
OS or Distro: Windows 10

Execute command parameters.

Postby mec » Wed Nov 11, 2015 10:20 am

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.

Cas
Top Bloke
Top Bloke
Posts: 3484
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: Execute command parameters.

Postby Cas » Wed Nov 11, 2015 11:13 am

No but just create an intermediate script that does that.

mec
New User
New User
Posts: 3
Joined: Wed Nov 11, 2015 8:23 am
OS or Distro: Windows 10

Re: Execute command parameters.

Postby mec » Wed Nov 11, 2015 11:48 am

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.

Cas
Top Bloke
Top Bloke
Posts: 3484
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: Execute command parameters.

Postby Cas » Wed Nov 11, 2015 10:28 pm

See here for details about scripts: http://dev.deluge-torrent.org/wiki/Plugins/Execute

mec
New User
New User
Posts: 3
Joined: Wed Nov 11, 2015 8:23 am
OS or Distro: Windows 10

Re: Execute command parameters.

Postby mec » Thu Nov 12, 2015 7:39 am

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?

Cas
Top Bloke
Top Bloke
Posts: 3484
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: Execute command parameters.

Postby Cas » Thu Nov 12, 2015 12:36 pm

What is the log output of Execute? Do the test scripts work? Start small and build from there...


Return to “Plugins”

Who is online

Users browsing this forum: No registered users and 3 guests