2 Commits e2fefd4ae5 ... 550029ec76

Auteur SHA1 Message Date
  sensordb2 550029ec76 opt: 优化安装说明.txt文字说明 il y a 1 mois
  sensordb2 a453aa8cca opt: 优化脚本 il y a 1 mois

+ 2 - 2
config/app.ini

@@ -17,8 +17,8 @@ ErrorLogPath = /opt/nginx-green/nginx-green/logs/error.log
 LogDirWhiteList = /opt/nginx-green/nginx-green/logs
 ConfigDir = /opt/nginx-green/nginx-green/conf
 PIDPath = /opt/nginx-green/nginx-green/logs/nginx.pid
-TestConfigCmd = /opt/nginx-green/nginx-green/bin/nginx -t -c /opt/nginx-green/nginx-green/conf/nginx.conf
-ReloadCmd = /opt/nginx-green/nginx-green/bin/nginx -s reload
+TestConfigCmd = /opt/nginx-green/nginx-green/bin/nginx-green -t -c /opt/nginx-green/nginx-green/conf/nginx.conf
+ReloadCmd = /opt/nginx-green/nginx-green/bin/nginx-green -s reload
 RestartCmd = systemctl restart nginx-green
 
 [openai]

+ 1 - 1
nginx-ui-green-installer/安装说明.txt

@@ -1,5 +1,5 @@
 version: v1.0.0
-install.sh脚本用于自动将nginx-ui-green时序数据库安装在/opt/nginx-ui-green/nginx-ui-green下
+install.sh脚本用于自动将nginx-ui-green安装在/opt/nginx-ui-green/nginx-ui-green下
 如存在旧版本文件需要重新命名
 (以下操作均需通过root用户执行)
 1. chmod +x *.sh给脚本可执行权限

+ 3 - 3
nginx-ui-green/run.sh

@@ -51,11 +51,11 @@ if [[ ! -d "$base_dir/log" ]]; then
 fi
 
 # preparation check
-if [[ ! -f "$base_dir/ui-launcher.sh" ]]; then
+if [[ ! -f "$base_dir/bin/nginx-ui" ]]; then
     log_err "文件夹中缺少nginx-ui-green(主程序),无法运行" && exit 1
 fi
 
-if [[ ! -x "$base_dir/ui-launcher.sh" ]]; then
+if [[ ! -x "$base_dir/bin/nginx-ui" ]]; then
     log_err "nginx-ui-green无可执行权限,无法运行。请使用chmod" && exit 1
 fi
 
@@ -67,6 +67,6 @@ else
         mkdir "$log_path"
     fi
     log_file="nginx-ui-green_$(date "+%Y-%m-%d-%H:%M:%S").log"
-    ./ui-launcher.sh server --config-file=$base_dir/config/config.xml &> "${log_path}${log_file}" &
+    ./bin/nginx-ui -config $base_dir/config/app.ini &> "${log_path}${log_file}" &
     ./status.sh
 fi

+ 0 - 15
nginx-ui-green/ui-launcher.sh

@@ -1,15 +0,0 @@
-#!/bin/bash
-
-base_dir=$(
-    cd "$(dirname "$0")"
-    pwd
-)
-cd $base_dir
-
-yaml() {
-    python3 -c "import yaml;print(yaml.safe_load(open('$1'))$2)"
-}
-
-PATH=/opt/nginx-green/nginx-green/bin/:$PATH
-
-./bin/nginx-ui -config ./config/app.ini