Minor Fixes
This commit is contained in:
parent
212aa8c68b
commit
2390a43e64
2 changed files with 17 additions and 2 deletions
|
@ -759,6 +759,10 @@ 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 $this->add_daemon_op(array('op'=>'service','info'=>'mysql','info2'=>'stop')); break;
|
||||
case 'dostartmysqld' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'mysql','info2'=>'start')); break;
|
||||
case 'dorestartmysqld' : $this->requireAdmin(); return $this->add_daemon_op(array('op'=>'service','info'=>'mysql','info2'=>'restart')); 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;
|
||||
|
@ -1433,6 +1437,13 @@ function executeProg3($prog,$echooutput=False){
|
|||
function check_program_service($progname,$start_opname,$stop_opname,$restart_opname){
|
||||
$this->output.="<tr><td>$progname: </td><td>";
|
||||
$serviceCount=$this->executeProg3("ps ax | grep $progname | grep -v grep | wc -l");
|
||||
|
||||
if($serviceCount == 0 && $progname == "mysqld"){
|
||||
// Try mariadb instead
|
||||
$progname = "mariadbd";
|
||||
$serviceCount=$this->executeProg3("ps ax | grep $progname | grep -v grep | wc -l");
|
||||
}
|
||||
|
||||
if ($serviceCount > 0) $this->output.="<font color='#00cc00'><strong>YES</strong></font>";
|
||||
else $this->output.="<font color='#ff0000'><strong>NO</strong></font>";
|
||||
$this->output.="</td><td> (<a href='?op=$start_opname'>Start</a> | <a href='?op=$stop_opname'>Stop</a> | <a href='?op=$restart_opname'>Restart</a>) Attention, by stopping your services, you may lose your conn. to panel.</td></tr>";
|
||||
|
|
|
@ -339,7 +339,7 @@ function aptgetRemove(){
|
|||
function checkDistro() {
|
||||
# Get distro properly
|
||||
if [ -e /etc/issue ]; then
|
||||
distro=$( cat /etc/issue | awk '{ print $1 }' )
|
||||
distro=$( cat /etc/issue | awk '{ print $1 }' | head -n 1 )
|
||||
fi
|
||||
|
||||
if [ ! -z "$distro" ]; then
|
||||
|
@ -350,7 +350,7 @@ function checkDistro() {
|
|||
|
||||
if [ -z "$distro" ] || [[ "$distro" != "ubuntu" && "$distro" != "debian" ]]; then
|
||||
if [ -e /etc/os-release ]; then
|
||||
distro=$( cat /etc/os-release | grep -o "^NAME=.*" | grep -o "[^NAME=\"].*[^\"]" )
|
||||
distro=$( cat /etc/os-release | grep -o "^NAME=.*" | grep -o "[^NAME=\"].*[^\"]" | awk '{print $1}' | awk '{print tolower($0)}' )
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -388,10 +388,14 @@ function checkDistro() {
|
|||
# version=$(lsb_release -r | awk '{ print $2 }')
|
||||
|
||||
echo "Your distro is $distro runnning version $version."
|
||||
logToInstallLogFile "Your distro is $distro runnning version $version."
|
||||
if [ "$distro" != "debian" ]; then
|
||||
echo "Your distros yearly release is $yrelease. Your distros monthly release is $mrelease."
|
||||
logToInstallLogFile "Your distros yearly release is $yrelease. Your distros monthly release is $mrelease."
|
||||
fi
|
||||
|
||||
logToInstallLogFile "OSBits is set to ${OSBits}"
|
||||
|
||||
if [ "$distro" == "debian" ] && [ "$yrelease" -lt "8" ]; then
|
||||
echo "Debian 7.x and lower are no longer supported."
|
||||
exit
|
||||
|
|
Loading…
Reference in a new issue