From e23b04c48d661e2f55e310b1c3e89dad461206f8 Mon Sep 17 00:00:00 2001 From: richwardle Date: Tue, 11 Feb 2025 15:52:50 +0000 Subject: [PATCH 1/2] Use Pm2 To Reset Validator --- scripts/autoupdater.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/autoupdater.sh b/scripts/autoupdater.sh index 30c098d49..d98aa1230 100644 --- a/scripts/autoupdater.sh +++ b/scripts/autoupdater.sh @@ -133,10 +133,12 @@ update_and_restart() { log ERROR "Failed to pull changes" return 1 fi - if [[ -x "./run.sh" ]]; then log INFO "Update successful, restarting application..." - exec ./run.sh + pm2 restart s1_validator_main_process + log INFO "Application restart initiated via PM2" + pm2 restart auto_updater + exit 0 else log ERROR "run.sh not found or not executable" return 1 From e7793e3bb29c602f47b6e8dd87cf28a95232970a Mon Sep 17 00:00:00 2001 From: richwardle Date: Tue, 11 Feb 2025 15:59:44 +0000 Subject: [PATCH 2/2] Remove Autoupdater Reset --- scripts/autoupdater.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/autoupdater.sh b/scripts/autoupdater.sh index d98aa1230..e02d0f852 100644 --- a/scripts/autoupdater.sh +++ b/scripts/autoupdater.sh @@ -133,12 +133,13 @@ update_and_restart() { log ERROR "Failed to pull changes" return 1 fi + if [[ -x "./run.sh" ]]; then - log INFO "Update successful, restarting application..." + log INFO "Update successful, restarting validator..." pm2 restart s1_validator_main_process - log INFO "Application restart initiated via PM2" - pm2 restart auto_updater - exit 0 + log INFO "Validator restart initiated via PM2" + # Let PM2 handle our own restart if needed + return 0 else log ERROR "run.sh not found or not executable" return 1