OpenVZ Forum


Home » General » Support » looking for a script to restart an VE via a website (controlpanel or something)
looking for a script to restart an VE via a website (controlpanel or something) [message #9300] Tue, 26 December 2006 18:44 Go to next message
glowfish is currently offline  glowfish
Messages: 2
Registered: November 2006
Junior Member
Hello,

i am looking for a script where it is possible to reboot your VE from a website.

I.e. Customer logs into a website. He checks a box "reboot ve" and the ve restarts within the next few seconds.

Is there anything like that existing ?

Regards
Daniel
Re: looking for a script to restart an VE via a website (controlpanel or something) [message #9318 is a reply to message #9300] Wed, 27 December 2006 11:38 Go to previous message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
First you just need a Database to store username, password, VE and Host IP

The reboot can be done in php using 'Secure Shell2 Functions'

<?
$connection = ssh2_connect($host_ip, 22);
ssh2_auth_password($connection, $host_username, $host_password);

$stream = ssh2_exec($connection, 'vzctl restart $veid');
?>


http://static.openvz.org/userbars/openvz-user.png
Previous Topic: Openvz - basic doubts
Next Topic: /proc/devices map
Goto Forum:
  


Current Time: Sat Oct 12 06:47:11 GMT 2024

Total time taken to generate the page: 0.07299 seconds