only nuke data on node shutdown

This commit is contained in:
Kevin Froman 2020-02-02 19:00:49 -06:00
parent 79a3f725be
commit 5b78a8810d
2 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,6 @@ from onionrblocks.deleteplaintext import delete_plaintext_no_blacklist # noqa
setup.setup_config() setup.setup_config()
import config # noqa import config # noqa
import filenuke
from utils import identifyhome from utils import identifyhome
if config.get('advanced.security_auditing', True): if config.get('advanced.security_auditing', True):
@ -88,8 +87,6 @@ if ran_as_script:
# Wipe Onionr data directory if security level calls for it # Wipe Onionr data directory if security level calls for it
config.reload() config.reload()
if config.get('general.security_level', 1) >= 2:
filenuke.nuke.clean_tree(identifyhome.identify_home())
# Cleanup standard out/err because Python refuses to do it itsself # Cleanup standard out/err because Python refuses to do it itsself
try: try:

View File

@ -7,11 +7,12 @@ import sys
import platform import platform
import sqlite3 import sqlite3
from threading import Thread from threading import Thread
from gevent import time from gevent import time
from gevent import spawn from gevent import spawn
from stem.connection import IncorrectPassword from stem.connection import IncorrectPassword
import toomanyobjs import toomanyobjs
import filenuke
import config import config
import onionrstatistics import onionrstatistics
@ -165,6 +166,8 @@ def daemon():
better_sleep(5) better_sleep(5)
cleanup.delete_run_files() cleanup.delete_run_files()
if config.get('general.security_level', 1) >= 2:
filenuke.nuke.clean_tree(identifyhome.identify_home())
def _ignore_sigint(sig, frame): # pylint: disable=W0612,W0613 def _ignore_sigint(sig, frame): # pylint: disable=W0612,W0613