sadas sadas wrote:
   Hi,

First of all, it is better if you write subject next time.

I want to write a php script that start/stop centos servers connected to Spacewalk server. Where in oracle database php script can edit so when I use my php to start/stop centos server and spacewalk to execute my command and to stop/start the server?

You do not want to use db directly. You really do not want it.
It is much better to use API instead.
Documentation of API is on:
https://url.of.your.spacewalk/rhn/apidoc/
You may want to use API call
 system.scheduleScriptRun
and call it with script
#!/bin/sh
/usr/bin/halt

Dunno how do you want to start it. WakeOnLan?

But if you are talking about guest. There is already API for that:
 system.scheduleGuestAction
it can: 'start', 'suspend', 'resume', 'restart', 'shutdown' virtual systems.

If this API call does not suite your needs, it is much better instead custom PHP scripting, create new API call in java and contribute it back to Spacewalk project so others can benefit from your work too. PHP script will use only few people (if any).

--
Miroslav Suchy
Red Hat Satellite Engineering

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to