From 7198ed1a042aa7034c36838f3a53c399f31f3e02 Mon Sep 17 00:00:00 2001 From: yungwine Date: Tue, 4 Feb 2025 10:13:19 +0400 Subject: [PATCH 1/2] add ExecStartPre = sleep 2 to new installations --- mytoninstaller/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mytoninstaller/settings.py b/mytoninstaller/settings.py index 8203a15d..88f67a66 100644 --- a/mytoninstaller/settings.py +++ b/mytoninstaller/settings.py @@ -66,7 +66,7 @@ def FirstNodeSettings(local): # Прописать автозагрузку cpus = psutil.cpu_count() - 1 cmd = f"{validatorAppPath} --threads {cpus} --daemonize --global-config {globalConfigPath} --db {ton_db_dir} --logname {tonLogPath} --archive-ttl {archive_ttl} --verbosity 1" - add2systemd(name="validator", user=vuser, start=cmd) # post="/usr/bin/python3 /usr/src/mytonctrl/mytoncore.py -e \"validator down\"" + add2systemd(name="validator", user=vuser, start=cmd, pre='/bin/sleep 2') # post="/usr/bin/python3 /usr/src/mytonctrl/mytoncore.py -e \"validator down\"" # Получить внешний ip адрес ip = get_own_ip() From 44711d15463f7710d00975cb7236869416d8b5cc Mon Sep 17 00:00:00 2001 From: yungwine Date: Tue, 4 Feb 2025 10:16:56 +0400 Subject: [PATCH 2/2] fix merge --- mytoninstaller/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mytoninstaller/settings.py b/mytoninstaller/settings.py index bdec730b..c9b667b3 100644 --- a/mytoninstaller/settings.py +++ b/mytoninstaller/settings.py @@ -67,14 +67,14 @@ def FirstNodeSettings(local): cpus = psutil.cpu_count() - 1 cmd = f"{validatorAppPath} --threads {cpus} --daemonize --global-config {globalConfigPath} --db {ton_db_dir} --logname {tonLogPath} --archive-ttl {archive_ttl} --verbosity 1" - add2systemd(name="validator", user=vuser, start=cmd, pre='/bin/sleep 2') # post="/usr/bin/python3 /usr/src/mytonctrl/mytoncore.py -e \"validator down\"" - if os.getenv('ADD_SHARD'): add_shard = os.getenv('ADD_SHARD') cmd += f' -M' for shard in add_shard.split(): cmd += f' --add-shard {shard}' + add2systemd(name="validator", user=vuser, start=cmd, pre='/bin/sleep 2') # post="/usr/bin/python3 /usr/src/mytonctrl/mytoncore.py -e \"validator down\"" + # Получить внешний ip адрес ip = get_own_ip() vport = random.randint(2000, 65000)