Skip to content

Commit

Permalink
PrintLiteServerConfig bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
igroman787 committed Jul 28, 2021
1 parent 393e07c commit 22e66de
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions mytoninstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ def Status(args):
mconfigPath = local.buffer["mconfigPath"]

tonBinDir = local.buffer["tonBinDir"]
server_key = tonBinDir + "validator-engine-console/server"
client_key = tonBinDir + "validator-engine-console/client"
liteserver_key = tonBinDir + "validator-engine-console/liteserver"
keysDir = local.buffer["keysDir"]
server_key = keysDir + "server"
client_key = keysDir + "client"
liteserver_key = keysDir + "liteserver"
liteserver_pubkey = liteserver_key + ".pub"


Expand All @@ -96,8 +97,11 @@ def Enable(args):
#end define

def PrintLiteServerConfig(args):
keysDir = local.buffer["keysDir"]
liteserver_key = keysDir + "liteserver"
liteserver_pubkey = liteserver_key + ".pub"
result = dict()
file = open("/usr/bin/ton/validator-engine-console/liteserver.pub", 'rb')
file = open(liteserver_pubkey, 'rb')
data = file.read()
file.close()
key = base64.b64encode(data[4:])
Expand Down Expand Up @@ -146,6 +150,7 @@ def General():
EnableValidatorConsole()
EnableLiteServer()
BackupVconfig()
BackupMconfig()
#end if

# Создать символические ссылки
Expand Down Expand Up @@ -520,6 +525,14 @@ def BackupVconfig():
subprocess.run(args)
#end define

def BackupMconfig():
local.AddLog("Backup mytoncore config file 'mytoncore.db' to 'mytoncore.db.backup'", "debug")
mconfigPath = local.buffer["mconfigPath"]
backupPath = mconfigPath + ".backup"
args = ["cp", mconfigPath, backupPath]
subprocess.run(args)
#end define

def CreateSymlinks():
local.AddLog("start CreateSymlinks fuction", "debug")
cport = local.buffer["cport"]
Expand Down

0 comments on commit 22e66de

Please sign in to comment.