From 993b42b3395a056e036a9e9518151e2c6693c6ec Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Sun, 29 Nov 2015 15:16:39 -0500 Subject: [PATCH] make sure we have the right daemon --- hbc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hbc b/hbc index da971c5..bba14c1 100755 --- a/hbc +++ b/hbc @@ -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 = {