Inside the webuzo sdk there is the part of code below:
PHP Code /**
* Restart services
*
* @category Advanced Settings
* @param string $service_name Specify the service to restart
E.g exim, dovecot, tomcat, httpd, named, pure-ftpd, mysqld
* @return string $resp Response of Action. Default: Serialize
*/
function restart_service($service_name){
$act = 'act=services';
$data['restart_service'] = $service_name;
$resp = $this->curl_call($act, $data);
$this->chk_error();
return $resp;
}
/**
* Start/Stop FTP
*
* @category Advanced Settings
* @param string $action Specify start/stop to START/STOP FTP service respectively
* @return string $resp Response of Action. Default: Serialize
*/
function start_stop_ftp($action){
$act = 'act=services';
if($action != 'stop'){
$data['status'] = 'stop';
}else{
$data['status'] = 'running';
}
$resp = $this->curl_call($act, $data);
$this->chk_error();
return $resp;
}
As for the restart_service, I cannot make it work. I am calling it through my website and while the rest of the functions are working, it always returns false. I am calling it using the service_name, not name.
The same applies to start_stop_ftp. Basicly I cannot understand how it works exactly. If I call it using stop as action, it will change it to running and if I call it using any other action (for example run), it will change it to stop.
Could you please let me know if any of you has managed to work with the above functions?
----------------------- TopWebHost.gr |