Skip to content

Commit

Permalink
add func check chilli status
Browse files Browse the repository at this point in the history
  • Loading branch information
bankjirapan authored and sevan committed Jun 30, 2024
1 parent 7d18bd6 commit 3574348
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions conf/functions.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ $*
EOF
}
status() {
PIDFILE=$1
if [ -f $PIDFILE ]; then
pid=$(cat $PIDFILE)
if ps -p $pid > /dev/null; then
echo "$NAME is running (pid $pid)"
return 0
else
echo "$NAME is not running, but pid file exists"
return 1
fi
else
echo "$NAME is not running"
return 3
fi
}
writeconfig1() {
cat <<EOF
# THIS FILE IS AUTOMATICALLY GENERATED
Expand Down

0 comments on commit 3574348

Please sign in to comment.