mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-16 11:52:58 +03:00
550b1798a1
Merge in DNS/adguard-home from 3457-darwin-svc-reload to master Closes #3457. Squashed commit of the following: commit e3d6fbccf8373194360b6480e2d702ccd0ec7107 Author: Eugene Burkov <e.burkov@adguard.com> Date: Wed Aug 18 00:52:39 2021 +0300 aghos: imp docs commit 220d37ebc1e0c2e9ba37a34650bff1480bd2fcf6 Author: Eugene Burkov <e.burkov@adguard.com> Date: Tue Aug 17 15:45:52 2021 +0300 all: fix ps
26 lines
371 B
Go
26 lines
371 B
Go
//go:build freebsd
|
|
// +build freebsd
|
|
|
|
package aghos
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func setRlimit(val uint64) (err error) {
|
|
var rlim syscall.Rlimit
|
|
rlim.Max = int64(val)
|
|
rlim.Cur = int64(val)
|
|
|
|
return syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlim)
|
|
}
|
|
|
|
func haveAdminRights() (bool, error) {
|
|
return os.Getuid() == 0, nil
|
|
}
|
|
|
|
func isOpenWrt() (ok bool) {
|
|
return false
|
|
}
|