work on cliui
This commit is contained in:
parent
c142ab770a
commit
083003191f
@ -389,6 +389,7 @@ class Core:
|
|||||||
conn.close()
|
conn.close()
|
||||||
except sqlite3.OperationalError:
|
except sqlite3.OperationalError:
|
||||||
retData = False
|
retData = False
|
||||||
|
self.daemonQueue()
|
||||||
events.event('queue_push', data = {'command': command, 'data': data}, onionr = None)
|
events.event('queue_push', data = {'command': command, 'data': data}, onionr = None)
|
||||||
|
|
||||||
return retData
|
return retData
|
||||||
|
@ -53,7 +53,7 @@ class OnionrCLIUI:
|
|||||||
while showMenu:
|
while showMenu:
|
||||||
if firstRun:
|
if firstRun:
|
||||||
print("please wait while Onionr starts...")
|
print("please wait while Onionr starts...")
|
||||||
subprocess.Popen(["./onionr.py", "start"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
daemon = subprocess.Popen(["./onionr.py", "start"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
||||||
time.sleep(30)
|
time.sleep(30)
|
||||||
firstRun = False
|
firstRun = False
|
||||||
|
|
||||||
@ -93,12 +93,13 @@ Daemon Running: ''' + isOnline + '''
|
|||||||
print("Onionr daemon will shutdown...")
|
print("Onionr daemon will shutdown...")
|
||||||
#self.myCore._utils.localCommand("shutdown")
|
#self.myCore._utils.localCommand("shutdown")
|
||||||
self.myCore.daemonQueueAdd('shutdown')
|
self.myCore.daemonQueueAdd('shutdown')
|
||||||
while self.myCore._utils.localCommand('ping') == 'pong':
|
try:
|
||||||
self.myCore.daemonQueueAdd('shutdown')
|
daemon.kill()
|
||||||
time.sleep(8)
|
except UnboundLocalError:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
print("Starting Daemon...")
|
print("Starting Daemon...")
|
||||||
subprocess.Popen(["./onionr.py", "start"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
daemon = subprocess.Popen(["./onionr.py", "start"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
|
||||||
elif choice in ("6", "quit"):
|
elif choice in ("6", "quit"):
|
||||||
showMenu = False
|
showMenu = False
|
||||||
elif choice == "":
|
elif choice == "":
|
||||||
|
Loading…
Reference in New Issue
Block a user