* Increased heartbeat timer
* Tried to fix bug where wrong node was being reported as being announced to * Refactored core somewhat - Removed data dir encryption (TODO: just encrypt pub/priv key pair) - Removed simplecrypt dependency
This commit is contained in:
parent
8c63d6c205
commit
58aa8ce1cc
11 changed files with 39 additions and 128 deletions
|
@ -103,31 +103,21 @@ class Onionr:
|
|||
|
||||
self.debug = False # Whole application debugging
|
||||
|
||||
if os.path.exists('data-encrypted.dat'):
|
||||
while True:
|
||||
print('Enter password to decrypt:')
|
||||
password = getpass.getpass()
|
||||
result = self.onionrCore.dataDirDecrypt(password)
|
||||
if os.path.exists(self.dataDir):
|
||||
break
|
||||
else:
|
||||
logger.error('Failed to decrypt: ' + result[1], timestamp = False)
|
||||
else:
|
||||
# If data folder does not exist
|
||||
if not data_exists:
|
||||
if not os.path.exists(self.dataDir + 'blocks/'):
|
||||
os.mkdir(self.dataDir + 'blocks/')
|
||||
# If data folder does not exist
|
||||
if not data_exists:
|
||||
if not os.path.exists(self.dataDir + 'blocks/'):
|
||||
os.mkdir(self.dataDir + 'blocks/')
|
||||
|
||||
# Copy default plugins into plugins folder
|
||||
if not os.path.exists(plugins.get_plugins_folder()):
|
||||
if os.path.exists('static-data/default-plugins/'):
|
||||
names = [f for f in os.listdir("static-data/default-plugins/") if not os.path.isfile(f)]
|
||||
shutil.copytree('static-data/default-plugins/', plugins.get_plugins_folder())
|
||||
# Copy default plugins into plugins folder
|
||||
if not os.path.exists(plugins.get_plugins_folder()):
|
||||
if os.path.exists('static-data/default-plugins/'):
|
||||
names = [f for f in os.listdir("static-data/default-plugins/") if not os.path.isfile(f)]
|
||||
shutil.copytree('static-data/default-plugins/', plugins.get_plugins_folder())
|
||||
|
||||
# Enable plugins
|
||||
for name in names:
|
||||
if not name in plugins.get_enabled_plugins():
|
||||
plugins.enable(name, self)
|
||||
# Enable plugins
|
||||
for name in names:
|
||||
if not name in plugins.get_enabled_plugins():
|
||||
plugins.enable(name, self)
|
||||
|
||||
for name in plugins.get_enabled_plugins():
|
||||
if not os.path.exists(plugins.get_plugin_data_folder(name)):
|
||||
|
@ -265,11 +255,6 @@ class Onionr:
|
|||
finally:
|
||||
self.execute(command)
|
||||
|
||||
if not self._developmentMode:
|
||||
encryptionPassword = self.onionrUtils.getPassword('Enter password to encrypt directory: ')
|
||||
self.onionrCore.dataDirEncrypt(encryptionPassword)
|
||||
shutil.rmtree(self.dataDir)
|
||||
|
||||
return
|
||||
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue