We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 912923f commit 8c1ded6Copy full SHA for 8c1ded6
platform/broadcom/sonic-platform-modules-cel/services/fancontrol/fancontrol
@@ -348,8 +348,12 @@ CheckFiles || exit 1
348
349
if [ -f "$PIDFILE" ]
350
then
351
- echo "File $PIDFILE exists, is fancontrol already running?" >&2
352
- exit 1
+ # Test if process is really running, if not, no need to exit
+ if ps -p $(echo $PIDFILE) > /dev/null
353
+ then
354
+ echo "File $PIDFILE exists, is fancontrol already running?" >&2
355
+ exit 1
356
+ fi
357
fi
358
echo $$ > "$PIDFILE"
359
0 commit comments