File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 73
73
sed -i ' /dns_resolver:/,+4s/^#//' conf/config.yaml
74
74
echo " passed: system nameserver imported"
75
75
76
+ # check whether the 'worker_cpu_affinity' is in nginx.conf .
77
+
78
+ make init
79
+
80
+ grep -E " worker_cpu_affinity" conf/nginx.conf > /dev/null
81
+ if [ ! $? -eq 0 ]; then
82
+ echo " failed: nginx.conf file is missing worker_cpu_affinity configuration"
83
+ exit 1
84
+ fi
85
+
86
+ echo " passed: nginx.conf file contains worker_cpu_affinity configuration"
87
+
76
88
# check admin https enabled
77
89
78
90
sed -i ' s/\# port_admin: 9180/port_admin: 9180/' conf/config.yaml
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ local function trim(s)
21
21
return (s :gsub (" ^%s*(.-)%s*$" , " %1" ))
22
22
end
23
23
24
+ -- Note: The `excute_cmd` return value will have a line break at the end,
25
+ -- it is recommended to use the `trim` function to handle the return value.
24
26
local function excute_cmd (cmd )
25
27
local t , err = io.popen (cmd )
26
28
if not t then
@@ -676,7 +678,7 @@ local function init()
676
678
local sys_conf = {
677
679
lua_path = pkg_path_org ,
678
680
lua_cpath = pkg_cpath_org ,
679
- os_name = excute_cmd (" uname" ),
681
+ os_name = trim ( excute_cmd (" uname" ) ),
680
682
apisix_lua_home = apisix_home ,
681
683
with_module_status = with_module_status ,
682
684
error_log = {level = " warn" },
You can’t perform that action at this time.
0 commit comments