19 lines
436 B
Bash
Executable File
19 lines
436 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -f "/tmp/blaze-pid" ]; then
|
|
recpid="$(cat /tmp/blaze-pid)"
|
|
# kill with SIGTERM, allowing finishing touches.
|
|
kill -15 "$recpid"
|
|
rm -f /tmp/blaze-pid
|
|
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
|
(
|
|
sleep 3
|
|
kill -9 "$recpid"
|
|
) >/dev/null 2>&1 &
|
|
notify-send -t 2000 "Grabación Terminada"
|
|
exit
|
|
else
|
|
notify-send -t 2000 "Grabación inactiva"
|
|
exit 1
|
|
fi
|