|
@ -70,6 +70,10 @@ def find_config(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_config(config): |
|
|
def check_config(config): |
|
|
|
|
|
if config.get('daemon', None) == 'stop': |
|
|
|
|
|
# no need to specify configuration for daemon stop |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
if config.get('local_address', '') in [b'0.0.0.0']: |
|
|
if config.get('local_address', '') in [b'0.0.0.0']: |
|
|
logging.warn('warning: local set to listen on 0.0.0.0, it\'s not safe') |
|
|
logging.warn('warning: local set to listen on 0.0.0.0, it\'s not safe') |
|
|
if config.get('server', '') in [b'127.0.0.1', b'localhost']: |
|
|
if config.get('server', '') in [b'127.0.0.1', b'localhost']: |
|
@ -165,11 +169,11 @@ def get_config(is_local): |
|
|
print_server_help() |
|
|
print_server_help() |
|
|
sys.exit(0) |
|
|
sys.exit(0) |
|
|
elif key == '-d': |
|
|
elif key == '-d': |
|
|
config['daemon'] = value |
|
|
config['daemon'] = to_str(value) |
|
|
elif key == '--pid-file': |
|
|
elif key == '--pid-file': |
|
|
config['pid-file'] = value |
|
|
config['pid-file'] = to_str(value) |
|
|
elif key == '--log-file': |
|
|
elif key == '--log-file': |
|
|
config['log-file'] = value |
|
|
config['log-file'] = to_str(value) |
|
|
elif key == '-q': |
|
|
elif key == '-q': |
|
|
v_count -= 1 |
|
|
v_count -= 1 |
|
|
config['verbose'] = v_count |
|
|
config['verbose'] = v_count |
|
|