From ffd8baabe0f2f1b1d626db7974205e461fb0b067 Mon Sep 17 00:00:00 2001 From: earnolmartin Date: Tue, 11 Jul 2023 21:00:34 -0600 Subject: [PATCH] Minor Changes --- ehcp/classapp.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ehcp/classapp.php b/ehcp/classapp.php index 1dfd933..5463a41 100755 --- a/ehcp/classapp.php +++ b/ehcp/classapp.php @@ -741,9 +741,6 @@ function runOp($op){ # these are like url to function mappers... maps op variab #case 'showconf' : return $this->showConfig();break; case 'changemypass' : return $this->changeMyPass();break; - # for mysql, stop and start is meaningless, because if mysql cannot run, then, panel also cannot be accessible or this functions do not work. - case 'dorestartmysql' : $this->requireAdmin(); return passthru2_silent("service mysql restart", true, true); break; - case 'dostopapache2' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'apache2','info2'=>'stop')); break; case 'dostartapache2' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'apache2','info2'=>'start')); break; case 'dorestartapache2' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'apache2','info2'=>'restart')); break; @@ -759,10 +756,6 @@ function runOp($op){ # these are like url to function mappers... maps op variab case 'dostopvsftpd' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'vsftpd','info2'=>'stop')); break; case 'dostartvsftpd' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'vsftpd','info2'=>'start')); break; case 'dorestartvsftpd' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'vsftpd','info2'=>'restart')); break; - - case 'dostopmysqld' : $this->requireAdmin(); return passthru2_silent("service mysql stop", true, true); break; - case 'dostartmysqld' : $this->requireAdmin(); return passthru2_silent("service mysql start", true, true); break; - case 'dorestartmysqld' : $this->requireAdmin(); return passthru2_silent("service mysql restart", true, true); break; case 'dostopbind' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'bind9','info2'=>'stop')); break; case 'dostartbind' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'bind9','info2'=>'start')); break; @@ -1446,7 +1439,12 @@ function check_program_service($progname,$start_opname,$stop_opname,$restart_opn if ($serviceCount > 0) $this->output.="YES"; else $this->output.="NO"; - $this->output.=" (Start | Stop | Restart) Attention, by stopping your services, you may lose your conn. to panel."; + + if( $progname != "mysqld" && $progname != "mariadbd" ){ + $this->output.=" (Start | Stop | Restart) Attention, by stopping your services, you may lose your conn. to panel."; + }else{ + $this->output.=""; + } } function serverStatus(){