Change pidof in alpine

This commit is contained in:
Ned Wright 2023-12-27 19:31:13 +00:00
parent a5bcda6082
commit dfff43d4c1
2 changed files with 8 additions and 2 deletions

View File

@ -702,7 +702,7 @@ ConfigComponent::Impl::periodicRegistrationRefresh()
mainloop->yield(chrono::milliseconds(500));
} else {
uint next_iteration_in_sec = getConfigurationWithDefault<uint>(
20,
600,
"Config Component",
"Refresh config update registration time interval"
);

View File

@ -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