|
@ -51,9 +51,12 @@ class Controller(util.LoggedClass): |
|
|
if sys.version_info < (3, 5, 3): |
|
|
if sys.version_info < (3, 5, 3): |
|
|
raise RuntimeError('Python >= 3.5.3 is required to run ElectrumX') |
|
|
raise RuntimeError('Python >= 3.5.3 is required to run ElectrumX') |
|
|
|
|
|
|
|
|
if os.geteuid() == 0: |
|
|
if os.geteuid() == 0 and not env.allow_root: |
|
|
raise RuntimeError('DO NOT RUN AS ROOT! Create an unprivileged ' |
|
|
raise RuntimeError('RUNNING AS ROOT IS STRONGLY DISCOURAGED!\n' |
|
|
'user account and use that') |
|
|
'You shoud create an unprivileged user account ' |
|
|
|
|
|
'and use that.\n' |
|
|
|
|
|
'To continue as root anyway, restart with ' |
|
|
|
|
|
'environment variable ALLOW_ROOT non-empty') |
|
|
|
|
|
|
|
|
# Set the event loop policy before doing anything asyncio |
|
|
# Set the event loop policy before doing anything asyncio |
|
|
self.logger.info('event loop policy: {}'.format(env.loop_policy)) |
|
|
self.logger.info('event loop policy: {}'.format(env.loop_policy)) |
|
|