mirror of
https://github.com/FakeTV/pseudo-channel.git
synced 2025-12-22 19:23:21 +00:00
Added condition to check whether the app is already running for specific channel, if so skip it so it doesn't generate the schedule twice.
This commit is contained in:
@@ -48,6 +48,9 @@ if [ "${#CHANNEL_DIR_ARR[@]}" -gt 1 ]; then
|
|||||||
for channel in "${CHANNEL_DIR_ARR[@]}"
|
for channel in "${CHANNEL_DIR_ARR[@]}"
|
||||||
do
|
do
|
||||||
|
|
||||||
|
# If the .pid file exists for this channel, skip it because it will update while running.
|
||||||
|
if [ ! -f "$channel/running.pid" ]
|
||||||
|
|
||||||
echo "+++++ Trying to generate daily schedule: ""$PYTHON_TO_USE" ./"$channel"/$SCRIPT_TO_EXECUTE_PLUS_ARGS
|
echo "+++++ Trying to generate daily schedule: ""$PYTHON_TO_USE" ./"$channel"/$SCRIPT_TO_EXECUTE_PLUS_ARGS
|
||||||
|
|
||||||
cd "$channel" && "./generate_daily_sched.sh"
|
cd "$channel" && "./generate_daily_sched.sh"
|
||||||
@@ -60,6 +63,8 @@ if [ "${#CHANNEL_DIR_ARR[@]}" -gt 1 ]; then
|
|||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user