Skip to content

Commit 0f5930a

Browse files
committed
Merge branch 'release/0.8.1'
2 parents 5892600 + 840798d commit 0f5930a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ func main() {
187187
- [Eric Halpern](https://github.com/ehalpern)
188188
- [Yota](https://github.com/nus)
189189
- [Erkan Durmus](https://github.com/derkan)
190+
- [maxxant](https://github.com/maxxant)
190191

191192
All the contributors are welcome. If you would like to be the contributor please accept some rules.
192193
- The pull requests will be accepted only in "develop" branch

daemon.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// license that can be found in the LICENSE file.
44

55
/*
6-
Package daemon 0.8.0 for use with Go (golang) services.
6+
Package daemon 0.8.1 for use with Go (golang) services.
77
88
Package daemon provides primitives for daemonization of golang services.
99
This package is not provide implementation of user daemon,

daemon_linux.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ import (
1111

1212
// Get the daemon properly
1313
func newDaemon(name, description string, dependencies []string) (Daemon, error) {
14-
if _, err := os.Stat("/sbin/initctl"); err == nil {
15-
return &upstartRecord{name, description, dependencies}, nil
16-
}
14+
// newer subsystem must be checked first
1715
if _, err := os.Stat("/run/systemd/system"); err == nil {
1816
return &systemDRecord{name, description, dependencies}, nil
1917
}
18+
if _, err := os.Stat("/sbin/initctl"); err == nil {
19+
return &upstartRecord{name, description, dependencies}, nil
20+
}
2021
return &systemVRecord{name, description, dependencies}, nil
2122
}
2223

0 commit comments

Comments
 (0)