From e2c4ed6c27ac19999bff536d6e41c7548ae67d0e Mon Sep 17 00:00:00 2001 From: Wang Sen Di Date: Mon, 24 Nov 2025 13:58:48 +0800 Subject: [PATCH] - --- deploy/release/t20251123/start.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/deploy/release/t20251123/start.sh b/deploy/release/t20251123/start.sh index 8406e1b..4e33dc3 100644 --- a/deploy/release/t20251123/start.sh +++ b/deploy/release/t20251123/start.sh @@ -8,21 +8,28 @@ __kill_process() { pkill -f "lotso run" 2>/dev/null } +__download_lotso() { + _tmp_path="${_lotso_path}.tmp" + + curl -sSfLk http://dl.snodehub.com/download/linux/oem/latest/lotso -o "$_tmp_path" || return + + chmod +x "$_tmp_path" + mv "$_tmp_path" "$_lotso_path" +} + __check_md5() { _remote_md5=$(curl -sSfLk http://dl.snodehub.com/download/linux/oem/latest/lotso.md5 || echo "") [[ -z "$_remote_md5" ]] && return if [[ ! -f "$_lotso_path" ]]; then - curl -sSfLk http://dl.snodehub.com/download/linux/oem/latest/lotso -o "$_lotso_path" - chmod +x "$_lotso_path" + __download_lotso return fi _local_md5=$(md5sum "$_lotso_path" | cut -d' ' -f1) if [[ "$_remote_md5" != "$_local_md5" ]]; then - curl -sSfLk http://dl.snodehub.com/download/linux/oem/latest/lotso -o "$_lotso_path" - chmod +x "$_lotso_path" + __download_lotso __kill_process fi }