Skip to content
Snippets Groups Projects
Commit b46b0bec authored by root's avatar root
Browse files

Fixed config file path

parent 3e927f3b
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,8 @@ COPY i42/ /i42
RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm \
&& yum install -y python36u python36u-devel python36u-pip \
&& pip3.6 install yacron \
&& pip3.6 install -r /i42/requirements.txt
&& ln -s /usr/bin/python3.6 /usr/bin/python3 && ln -s /usr/bin/pip3.6 /usr/bin/pip3 \
&& pip3 install yacron \
&& pip3 install -r /i42/requirements.txt
CMD ["yacron", "-c", "i42/yacron.yaml"]
import configparser
import logging
import os, sys
class Config:
......@@ -11,7 +12,7 @@ class Config:
if args.config is not None:
config.read(args.config)
else:
config.read('config.ini')
config.read(os.path.dirname(sys.argv[0]) + '/config.ini')
# Arguments have higher precedence, if not set, config will decide
if args.ipv4_only is True:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment