diff --git a/daemon.go b/daemon.go index e3743a4..617bae6 100644 --- a/daemon.go +++ b/daemon.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -Package daemon 0.2.4 for use with Go (golang) services. +Package daemon 0.2.5 for use with Go (golang) services. Package daemon provides primitives for daemonization of golang services. This package is not provide implementation of user daemon, diff --git a/daemon_linux_systemv.go b/daemon_linux_systemv.go index 7795772..8538c7d 100644 --- a/daemon_linux_systemv.go +++ b/daemon_linux_systemv.go @@ -234,6 +234,8 @@ lockfile="/var/lock/subsys/$proc" stdoutlog="/var/log/$proc.log" stderrlog="/var/log/$proc.err" +[[ -d $(dirname $lockfile) ]] || mkdir -p $(dirname $lockfile) + [ -e /etc/sysconfig/$proc ] && . /etc/sysconfig/$proc start() {