Hi,

23.07.2007 00:25,, JC Júnior wrote::
> Hi all,
> 
> I'm trying to write a bacula's web interface

That's indeed a good thing, but it might be better to see if you could 
help improving the existing web interfaces...

> where i can create and 
> start jobs, configure storages, etc.

Do define and configure most things you'll need to write modified 
configuration files.

> But reading the documentations i 
> understood that is only possible use python in the beginning and during 
> the execution, and i want a way to start a job from web interface. how 
> can i do that??

The simples way to go is to call bconsole and feed it the necessary 
commands. In shell language, something like
cat <<EOF | bconsole -c ...
run level=full job=yourjob
yes
EOF
would be an option.

In python, it's a little more complicated, but still possible.
I did something similar in perl, but the concept is portable to python:
use open2 to open pipes to a command you start.
Write commands to the writing pipe, and read results from the reading 
pipe.
Parse the output you read for errors, and once you know everything you 
fed to the write pipe was digested, empty the read pipe and close 
everything.

The hardest part is parsing the output... if possible, try using the 
dot-commands bconsole supports.

> its is possible ou i need to call a shell script?? is 
> possible create a non-interactive shell script??

No and yes.

> thanks for all .

You will need some experimenting, but there are many programs around 
you could use a samples.

Arno

> Jc Júnior
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to