mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-19 01:05:37 +03:00
Fix for running ulimit check
This commit is contained in:
parent
d6df615588
commit
d311345aa5
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -98,7 +98,7 @@ func main() {
|
||||||
// Warn if ulimit is too low for production sites
|
// Warn if ulimit is too low for production sites
|
||||||
if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") &&
|
if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") &&
|
||||||
!addr.IP.IsLoopback() && !checkedFdLimit {
|
!addr.IP.IsLoopback() && !checkedFdLimit {
|
||||||
out, err := exec.Command("ulimit", "-n").Output()
|
out, err := exec.Command("sh", "-c", "ulimit -n").Output() // use sh because ulimit isn't in Linux $PATH
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Note that an error here need not be reported
|
// Note that an error here need not be reported
|
||||||
lim, err := strconv.Atoi(string(bytes.TrimSpace(out)))
|
lim, err := strconv.Atoi(string(bytes.TrimSpace(out)))
|
||||||
|
|
Loading…
Reference in a new issue