Skip to content

Commit e9a9470

Browse files
committed
Switch to get_os_type and ditch is_redhat_os in nginx_plugin
1 parent d7b33ca commit e9a9470

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
@@ -2353,16 +2353,6 @@ public function is_allowed_group($groupname, $check_id = true, $restrict_names =
23532353
return true;
23542354
}
23552355

2356-
public function is_redhat_os() {
2357-
global $app;
2358-
2359-
if(file_exists('/etc/redhat-release') && (filesize('/etc/redhat-release') > 0)) {
2360-
return true;
2361-
} else {
2362-
return false;
2363-
}
2364-
}
2365-
23662356
public function get_os_type() {
23672357
global $app;
23682358

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)