Skip to content

Commit

Permalink
Fixed bin/botbond and reviewed requirements.txt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Delle Cave committed Jun 25, 2018
1 parent bed77b9 commit 08a341e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
13 changes: 9 additions & 4 deletions bin/botbond
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ __license__ = """
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
__version__ = '0.13'

# TODO: load Python logging configuration (using standard logging.config)

Expand Down Expand Up @@ -74,12 +75,12 @@ def argv_parse_check():
parser.add_option("-u",
dest = 'username',
type = 'string',
default = "root",
default = pwd.getpwuid(os.geteuid())[0],
help = "Use username for the process instead of %default")
parser.add_option("-g",
dest = 'groupname',
type = 'string',
default = "root",
default = grp.getgrgid(os.getegid())[0],
help = "Use groupname for the process instead of %default")
parser.add_option("--logfile",
dest = 'logfile',
Expand Down Expand Up @@ -114,6 +115,9 @@ def main(options):
uid = pwd.getpwnam(options.username)[2]
gid = grp.getgrnam(options.groupname)[2]

setattr(options, 'server_version', "%s/%s" % (SYSLOG_NAME, __version__))
setattr(options, 'sys_version', '')

http_json_server.init(options, False)
config.DWHO_THREADS.append(http_json_server.stop)

Expand All @@ -122,8 +126,9 @@ def main(options):
daemonize.daemonize()

dirpid = os.path.dirname(options.pidfile)
helpers.make_dirs(dirpid)
os.chown(dirpid, uid, gid)
if dirpid:
helpers.make_dirs(dirpid)
os.chown(dirpid, uid, gid)

LOG.info("locking PID")
daemonize.lock_pidfile_or_die(options.pidfile)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
dwho
dwho>=0.2.27
emoji
hypchat
pyyaml>=3.10
redis>=2.4.0
requests
slackclient
sonicprobe>=0.2.40
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import find_packages, setup

requirements = [line.strip() for line in open('requirements.txt', 'r').readlines()]
version = '0.12'
version = '0.13'

if os.path.isfile('VERSION'):
version = open('VERSION', 'r').readline().strip() or version
Expand Down

0 comments on commit 08a341e

Please sign in to comment.