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

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