From dfff43d4c1db637311e89fea84ea2e899ffb9790 Mon Sep 17 00:00:00 2001 From: Ned Wright Date: Wed, 27 Dec 2023 19:31:13 +0000 Subject: [PATCH] Change pidof in alpine --- core/config/config.cc | 2 +- nodes/orchestration/package/watchdog/watchdog | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/config/config.cc b/core/config/config.cc index fdffbfc..f7a69b7 100644 --- a/core/config/config.cc +++ b/core/config/config.cc @@ -702,7 +702,7 @@ ConfigComponent::Impl::periodicRegistrationRefresh() mainloop->yield(chrono::milliseconds(500)); } else { uint next_iteration_in_sec = getConfigurationWithDefault( - 20, + 600, "Config Component", "Refresh config update registration time interval" ); diff --git a/nodes/orchestration/package/watchdog/watchdog b/nodes/orchestration/package/watchdog/watchdog index 546069f..9cecca7 100755 --- a/nodes/orchestration/package/watchdog/watchdog +++ b/nodes/orchestration/package/watchdog/watchdog @@ -97,11 +97,17 @@ else fi fi +alpine_pid() +{ + ps -ef | grep $1 | grep -v grep | awk '{printf $1 " "}' +} + + ls -l /etc/ | grep release > /dev/null 2>&1 retval=$? if [ $retval -eq 0 ]; then if [ ! -z "$(cat /etc/*release | grep alpine)" ]; then - pidof_cmd="pidof" + pidof_cmd="alpine_pid" ARCH="alpine" echo "alpine" >${FILESYSTEM_PATH}/watchdog/platform fi