|
|
@ -8,6 +8,7 @@ import datetime |
|
|
|
import time |
|
|
|
import time |
|
|
|
import hashlib |
|
|
|
import hashlib |
|
|
|
import base64 |
|
|
|
import base64 |
|
|
|
|
|
|
|
import configobj |
|
|
|
|
|
|
|
|
|
|
|
from i2p import samclasses |
|
|
|
from i2p import samclasses |
|
|
|
from i2p import socket |
|
|
|
from i2p import socket |
|
|
@ -29,6 +30,11 @@ parser.add_argument('-c', '--config', default='/etc/py-i2phosts/checker.conf', d |
|
|
|
help='config file to use') |
|
|
|
help='config file to use') |
|
|
|
args = parser.parse_args() |
|
|
|
args = parser.parse_args() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# read config |
|
|
|
|
|
|
|
config = configobj.ConfigObj(args.config_file, file_error=True) |
|
|
|
|
|
|
|
config_included = configobj.ConfigObj(config['include']) |
|
|
|
|
|
|
|
config.merge(config_included) |
|
|
|
|
|
|
|
|
|
|
|
# configure logger |
|
|
|
# configure logger |
|
|
|
log = logging.getLogger(sys.argv[0]) |
|
|
|
log = logging.getLogger(sys.argv[0]) |
|
|
|
handler = logging.StreamHandler() |
|
|
|
handler = logging.StreamHandler() |
|
|
|