Get rid of fragile recursive rm, move cleanup to mpegize. This way

"mpegize stop" does not have to wait for "mpegize start".
This commit is contained in:
Pavel Machek
2024-05-10 09:36:24 +02:00
parent b77064dda0
commit 48a4b8db2a
2 changed files with 10 additions and 4 deletions

View File

@@ -19,10 +19,10 @@ if [ "-$1" == "-start" ]; then
echo $! > $GIGA_DIR/audio.pid
@LIBEXECDIR@/mpegize.py start $GIGA_DIR/ $DEST_NAME $FPS $MODE
elif [ "-$1" == "-stop" ]; then
kill `cat $2/audio.pid`
kill `cat $GIGA_DIR/audio.pid`
rm $GIGA_DIR/audio.pid
cd $GIGA_DIR
@LIBEXECDIR@/mpegize.py stop $GIGA_DIR/ $DEST_NAME $FPS $MODE
rm -r $GIGA_DIR
echo Message: Rec
else
echo "Unrecognized command"