make sure we have the right daemon
This commit is contained in:
@@ -20,7 +20,11 @@ import errno
|
||||
import traceback
|
||||
import lockfile
|
||||
import daemon
|
||||
import daemon.pidfile
|
||||
try:
|
||||
import daemon.pidfile
|
||||
except:
|
||||
print "need version 2.1 or higer of python-daemon"
|
||||
sys.exit(1)
|
||||
import syslog
|
||||
|
||||
|
||||
@@ -51,7 +55,7 @@ def getsock(host):
|
||||
logm = '%s hbc died: \n%s' % ('getsock', traceback.format_exc())
|
||||
if DBG: print logm
|
||||
return None
|
||||
if r[0][0] in [28, 30]:
|
||||
if r[0][0] in [10, 28, 30]:
|
||||
af_type=socket.AF_INET6
|
||||
elif r[0][0] == 2:
|
||||
af_type=socket.AF_INET
|
||||
@@ -296,6 +300,7 @@ if fdaemon:
|
||||
working_directory='/tmp',
|
||||
umask=0o002,
|
||||
pidfile=pidfile,
|
||||
initgroups=False,
|
||||
)
|
||||
|
||||
context.signal_map = {
|
||||
|
||||
Reference in New Issue
Block a user