mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[PR #1389] Fix Windows reload issue (/bin/sh not found) #5701
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#5701
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/0xJacky/nginx-ui/pull/1389
State: closed
Merged: Yes
This PR adds native Windows compatibility for Nginx-UI, fixing the following error when reloading Nginx on
Windows:
Updated execShell in internal/nginx/exec.go
to use cmd /C instead of /bin/sh -c when running on Windows.
This makes ReloadCmd, RestartCmd, and other Nginx commands work properly on Windows environments.
Implementation Detail
Added import "runtime" for OS detection.
Tested Environment
OS: Windows 10 / Windows Server 2019
Nginx: Windows build (nginx.exe)
Result:
Reload and Restart work correctly
UI responds successfully
No /bin/sh errors