mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-09 09:10:12 +03:00
Pull request: 4046 darwin service message
Merge in DNS/adguard-home from 4046-log-dir to master Closes #4046. Squashed commit of the following: commit 05140550b14f477f52487c575f56428ce9e6fa10 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Jan 5 17:54:11 2022 +0500 all: add macOS service msg
This commit is contained in:
parent
e9c59b098e
commit
34c95f99f8
3 changed files with 15 additions and 29 deletions
internal/home
|
@ -82,6 +82,12 @@ func svcStatus(s service.Service) (status service.Status, err error) {
|
|||
// On OpenWrt, the service utility may not exist. We use our service script
|
||||
// directly in this case.
|
||||
func svcAction(s service.Service, action string) (err error) {
|
||||
if runtime.GOOS == "darwin" &&
|
||||
action == "start" &&
|
||||
!strings.HasPrefix(Context.workDir, "/Applications/") {
|
||||
log.Info("warning: service must be started from within the /Applications directory")
|
||||
}
|
||||
|
||||
err = service.Control(s, action)
|
||||
if err != nil && service.Platform() == "unix-systemv" &&
|
||||
(action == "start" || action == "stop" || action == "restart") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue