@@ -34,6 +34,7 @@ def FirstNodeSettings(local):
3434 validatorAppPath = local .buffer .validator_app_path
3535 globalConfigPath = local .buffer .global_config_path
3636 vconfig_path = local .buffer .vconfig_path
37+ archive_ttl = 2592000 if local .buffer .mode == 'liteserver' else 86400
3738
3839 # Проверить конфигурацию
3940 if os .path .isfile (vconfig_path ):
@@ -57,8 +58,7 @@ def FirstNodeSettings(local):
5758
5859 # Прописать автозагрузку
5960 cpus = psutil .cpu_count () - 1
60- cmd = "{validatorAppPath} --threads {cpus} --daemonize --global-config {globalConfigPath} --db {ton_db_dir} --logname {tonLogPath} --state-ttl 604800 --verbosity 1"
61- cmd = cmd .format (validatorAppPath = validatorAppPath , globalConfigPath = globalConfigPath , ton_db_dir = ton_db_dir , tonLogPath = tonLogPath , cpus = cpus )
61+ cmd = f"{ validatorAppPath } --threads { cpus } --daemonize --global-config { globalConfigPath } --db { ton_db_dir } --logname { tonLogPath } --state-ttl 604800 --archive-ttl { archive_ttl } --verbosity 1"
6262 add2systemd (name = "validator" , user = vuser , start = cmd ) # post="/usr/bin/python3 /usr/src/mytonctrl/mytoncore.py -e \"validator down\""
6363
6464 # Получить внешний ip адрес
@@ -894,6 +894,7 @@ def EnableMode(local):
894894 args = ["python3" , "-m" , "mytoncore" , "-e" ]
895895 if local .buffer .mode == 'liteserver' :
896896 args .append ("enable_liteserver_mode" )
897- elif local .buffer .mode == 'validator' :
898- args .append ("enable_validator_mode" )
897+ else :
898+ return
899+ args = ["su" , "-l" , local .buffer .user , "-c" , ' ' .join (args )]
899900 subprocess .run (args )
0 commit comments