mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
Merge pull request #1015 from 0xJacky/dev
Some checks are pending
Build / build_app (push) Waiting to run
Build / build (386, linux) (push) Blocked by required conditions
Build / build (386, windows) (push) Blocked by required conditions
Build / build (amd64, darwin) (push) Blocked by required conditions
Build / build (amd64, linux) (push) Blocked by required conditions
Build / build (amd64, windows) (push) Blocked by required conditions
Build / build (arm, 5, linux) (push) Blocked by required conditions
Build / build (arm, 6, linux) (push) Blocked by required conditions
Build / build (arm, 7, linux) (push) Blocked by required conditions
Build / build (arm64, darwin) (push) Blocked by required conditions
Build / build (arm64, linux) (push) Blocked by required conditions
Build / build (arm64, windows) (push) Blocked by required conditions
Build / build (loong64, linux) (push) Blocked by required conditions
Build / build (mips, linux) (push) Blocked by required conditions
Build / build (mips64, linux) (push) Blocked by required conditions
Build / build (mips64le, linux) (push) Blocked by required conditions
Build / build (mipsle, linux) (push) Blocked by required conditions
Build / build (riscv64, linux) (push) Blocked by required conditions
Build / docker-build (push) Blocked by required conditions
CodeQL / Analyze (go) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Build Documents / build (push) Waiting to run
Some checks are pending
Build / build_app (push) Waiting to run
Build / build (386, linux) (push) Blocked by required conditions
Build / build (386, windows) (push) Blocked by required conditions
Build / build (amd64, darwin) (push) Blocked by required conditions
Build / build (amd64, linux) (push) Blocked by required conditions
Build / build (amd64, windows) (push) Blocked by required conditions
Build / build (arm, 5, linux) (push) Blocked by required conditions
Build / build (arm, 6, linux) (push) Blocked by required conditions
Build / build (arm, 7, linux) (push) Blocked by required conditions
Build / build (arm64, darwin) (push) Blocked by required conditions
Build / build (arm64, linux) (push) Blocked by required conditions
Build / build (arm64, windows) (push) Blocked by required conditions
Build / build (loong64, linux) (push) Blocked by required conditions
Build / build (mips, linux) (push) Blocked by required conditions
Build / build (mips64, linux) (push) Blocked by required conditions
Build / build (mips64le, linux) (push) Blocked by required conditions
Build / build (mipsle, linux) (push) Blocked by required conditions
Build / build (riscv64, linux) (push) Blocked by required conditions
Build / docker-build (push) Blocked by required conditions
CodeQL / Analyze (go) (push) Waiting to run
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Build Documents / build (push) Waiting to run
chore: update install.sh
This commit is contained in:
commit
7c791f3784
4 changed files with 9 additions and 7 deletions
6
internal/cache/index.go
vendored
6
internal/cache/index.go
vendored
|
@ -348,7 +348,7 @@ func (s *Scanner) scanSingleFile(filePath string) error {
|
||||||
if strings.Contains(includePath, "*") {
|
if strings.Contains(includePath, "*") {
|
||||||
// If it's a relative path, make it absolute based on nginx config dir
|
// If it's a relative path, make it absolute based on nginx config dir
|
||||||
if !filepath.IsAbs(includePath) {
|
if !filepath.IsAbs(includePath) {
|
||||||
configDir := filepath.Dir(nginx.GetConfPath("", ""))
|
configDir := filepath.Dir(nginx.GetConfPath())
|
||||||
includePath = filepath.Join(configDir, includePath)
|
includePath = filepath.Join(configDir, includePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,7 +373,7 @@ func (s *Scanner) scanSingleFile(filePath string) error {
|
||||||
// Handle single file include
|
// Handle single file include
|
||||||
// If it's a relative path, make it absolute based on nginx config dir
|
// If it's a relative path, make it absolute based on nginx config dir
|
||||||
if !filepath.IsAbs(includePath) {
|
if !filepath.IsAbs(includePath) {
|
||||||
configDir := filepath.Dir(nginx.GetConfPath("", ""))
|
configDir := filepath.Dir(nginx.GetConfPath())
|
||||||
includePath = filepath.Join(configDir, includePath)
|
includePath = filepath.Join(configDir, includePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ func (s *Scanner) ScanAllConfigs() error {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Get the main config file
|
// Get the main config file
|
||||||
mainConfigPath := nginx.GetConfPath("", "nginx.conf")
|
mainConfigPath := nginx.GetConfEntryPath()
|
||||||
err := s.scanSingleFile(mainConfigPath)
|
err := s.scanSingleFile(mainConfigPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("Failed to scan main config:", err)
|
logger.Error("Failed to scan main config:", err)
|
||||||
|
|
|
@ -51,7 +51,7 @@ func GetNginxWorkerConfigInfo() (*NginxConfigInfo, error) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
confPath := nginx.GetConfPath("nginx.conf")
|
confPath := nginx.GetConfEntryPath()
|
||||||
if confPath == "" {
|
if confPath == "" {
|
||||||
return nil, errors.New("failed to get nginx.conf path")
|
return nil, errors.New("failed to get nginx.conf path")
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ type PerfOpt struct {
|
||||||
|
|
||||||
// UpdatePerfOpt updates the Nginx performance optimization settings
|
// UpdatePerfOpt updates the Nginx performance optimization settings
|
||||||
func UpdatePerfOpt(opt *PerfOpt) error {
|
func UpdatePerfOpt(opt *PerfOpt) error {
|
||||||
confPath := nginx.GetConfPath("nginx.conf")
|
confPath := nginx.GetConfEntryPath()
|
||||||
if confPath == "" {
|
if confPath == "" {
|
||||||
return errors.New("failed to get nginx.conf path")
|
return errors.New("failed to get nginx.conf path")
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,15 @@ CONFIG="/usr/local/etc/nginx-ui/app.ini"
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
echo "Starting $NAME..."
|
echo "Starting $NAME..."
|
||||||
start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- $CONFIG
|
# BusyBox compatible syntax
|
||||||
|
start-stop-daemon -S -b -p $PIDFILE -m -x $DAEMON -- $CONFIG
|
||||||
echo "$NAME started"
|
echo "$NAME started"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo "Stopping $NAME..."
|
echo "Stopping $NAME..."
|
||||||
start-stop-daemon --stop --pidfile $PIDFILE --retry 10
|
# BusyBox compatible syntax
|
||||||
|
start-stop-daemon -K -p $PIDFILE -R 10
|
||||||
rm -f $PIDFILE
|
rm -f $PIDFILE
|
||||||
echo "$NAME stopped"
|
echo "$NAME stopped"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue