From 17659173e35bf97fb0dba3200a3793ce0af74bdd Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Fri, 30 Jan 2015 14:26:17 +0100 Subject: [PATCH] [add] check encode process --- bin/cronTask.sh.sample | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cronTask.sh.sample b/bin/cronTask.sh.sample index 463b54a..d9d06b9 100644 --- a/bin/cronTask.sh.sample +++ b/bin/cronTask.sh.sample @@ -13,12 +13,13 @@ mimeMagic=/etc/mime.types cd $tempDest nbProcessLauch=$(ps -ef | grep -v grep | grep youtube-dl | wc -l) - -if [ $nbProcessLauch != 0 ] +nbEncodeLauch=$(ps -ef | grep -v grep | grep "$convertingTool" | wc -l) +if [ "$nbProcessLauch" -ne 0 ] || [ "$nbEncodeLauch" -ne 0 ] then exit fi + for file in $tempDest*.hash do if [ -f $file ];