Skip to content

Commit 7b3ce95

Browse files
author
Till Brehm
committed
Merge branch '6845-replace_remove_is_redhat_os' into 'develop'
Switch to get_os_type and ditch is_redhat_os in nginx_plugin Closes #6845 See merge request ispconfig/ispconfig3!2001
2 parents e70579f + e9a9470 commit 7b3ce95

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

server/lib/classes/system.inc.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,16 +2357,6 @@ public function is_allowed_group($groupname, $check_id = true, $restrict_names =
23572357
return true;
23582358
}
23592359

2360-
public function is_redhat_os() {
2361-
global $app;
2362-
2363-
if(file_exists('/etc/redhat-release') && (filesize('/etc/redhat-release') > 0)) {
2364-
return true;
2365-
} else {
2366-
return false;
2367-
}
2368-
}
2369-
23702360
public function get_os_type() {
23712361
global $app;
23722362

server/plugins-available/nginx_plugin.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2941,7 +2941,8 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name,
29412941
$tpl->setVar('fpm_user', $data['new']['system_user']);
29422942

29432943
// RH workaround here
2944-
if($app->system->is_redhat_os() == true) {
2944+
$dist = $app->system->get_os_type();
2945+
if(isset($dist['type']) && $dist['type'] == 'redhat'){
29452946
$tpl->setVar('fpm_group', $data['new']['system_group']);
29462947
$tpl->setVar('fpm_listen_group', $data['new']['system_group']);
29472948
} else {

0 commit comments

Comments
 (0)