From 49a594277dd0f677dd4e59deb8ce408359ab0ed7 Mon Sep 17 00:00:00 2001 From: xiaoz Date: Thu, 23 Nov 2023 17:53:35 +0800 Subject: [PATCH] fix bug --- dnmp.sh | 12 ++++++------ nginx/conf/nginx.conf | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dnmp.sh b/dnmp.sh index cd6ea2c..c1d8435 100644 --- a/dnmp.sh +++ b/dnmp.sh @@ -86,8 +86,8 @@ start(){ # 运行前检查 run_check # 获取用户传递的第二个参数 - service=$2 - echo $service + service=$1 + # 如果service为空,或者为all,则运行所有服务 if [ "${service}" = "" ] || [ "${service}" = "all" ] then @@ -141,8 +141,8 @@ stop(){ # 运行前检查 run_check # 获取用户传递的第二个参数 - service=$2 - echo $service + service=$1 + # 如果service为空,或者为all,则停止所有服务 if [ "${service}" = "" ] || [ "${service}" = "all" ] then @@ -194,10 +194,10 @@ case $1 in init ;; 'start') - start + start ${2} ;; 'stop') - stop + stop ${2} ;; *) echo "Usage: $0 {init|run|stop}" diff --git a/nginx/conf/nginx.conf b/nginx/conf/nginx.conf index c8c8e65..884864e 100644 --- a/nginx/conf/nginx.conf +++ b/nginx/conf/nginx.conf @@ -1,4 +1,4 @@ -user root; +# user root; worker_processes auto; worker_rlimit_nofile 50000; error_log /usr/local/nginx/logs/error.log; @@ -100,7 +100,7 @@ http { root /var/www/html/default; index index.php index.html index.htm; - + # PHP 配置 location ~ [^/]\.php(/|$) { include fastcgi_params;