OpenVZ Forum


Home » General » Support » looking for a script to restart an VE via a website (controlpanel or something)
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
 
Read Message
Read Message
Previous Topic: Openvz - basic doubts
Next Topic: /proc/devices map
Goto Forum:
  


Current Time: Sat Aug 30 05:49:42 GMT 2025

Total time taken to generate the page: 0.07763 seconds