T
T
Taras Labiak2018-04-18 01:56:38
bash
Taras Labiak, 2018-04-18 01:56:38

How to check if a process is running in bash with a pid file?

Am I correct to check if the process is running?

PID=`cat $PIDFILE`
if 
then

Whole daemon code: parity.sh

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2018-04-18
@kissarat

Usually they also check whether this is the process that interests you - so as not to nail something else inadvertently.

A
Ainur Valiev, 2018-04-18
@vaajnur

everything is fine, just remove the logical AND -a

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question