Started work on modernizing
This commit is contained in:
parent
23378403f3
commit
b1b3655a0d
1 changed files with 3 additions and 3 deletions
|
@ -35,14 +35,14 @@ class manage_chat_panel extends admin_module{
|
||||||
global $config, $db,$panel, $cache, $session;
|
global $config, $db,$panel, $cache, $session;
|
||||||
if(isset($_POST['start'])){
|
if(isset($_POST['start'])){
|
||||||
$istat = $this->get_status();
|
$istat = $this->get_status();
|
||||||
exec('/sbin/status topia|awk \'{ print $4}\'',$cat);
|
exec('/bin/systemctl status austria|grep running',$cat);
|
||||||
$cat = trim($cat[0]);
|
$cat = trim($cat[0]);
|
||||||
if($istat==2 && $cat!="not"){
|
if($istat==2 && $cat!="not"){
|
||||||
shell_exec("kill -9 ".$cat);
|
shell_exec("kill -9 ".$cat);
|
||||||
sleep(5);
|
sleep(5);
|
||||||
shell_exec("sudo /sbin/restart topia");
|
shell_exec("sudo /bin/systemctl restart austria");
|
||||||
}else{
|
}else{
|
||||||
shell_exec("sudo /sbin/restart topia");
|
shell_exec("sudo /bin/systemctl restart austria");
|
||||||
}
|
}
|
||||||
$panel->admin_message("Triggered", 'The Chatstart has been triggered. please refresh the page to see if it was successful.',TRUE,"manage_chat");
|
$panel->admin_message("Triggered", 'The Chatstart has been triggered. please refresh the page to see if it was successful.',TRUE,"manage_chat");
|
||||||
}elseif(isset($_POST['emergency'])){
|
}elseif(isset($_POST['emergency'])){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue