1
0
mirror of https://github.com/kenzok8/small-package synced 2025-09-18 18:51:16 +08:00
Files
small-package/luci-app-homebridge/files/root/usr/share/homebridge/process_status.sh
github-actions[bot] 16a922f897 update-09.24
2021-09-24 23:37:27 +08:00

23 lines
309 B
Bash
Executable File

#!/bin/sh
CONFIG_BASE="/usr/share/homebridge/devices/"
if [ -z $1 ]
then
echo "Need a section argument"
exit 1
fi
pid_path=$CONFIG_BASE/$1/homebridge.pid
echo $pid_path
if [ -f $pid_path ];then
pid_number=$(cat $pid_path)
if [ -d /proc/$pid_number ];then
exit 0
else
exit 1
fi
else
exit 1
fi