22 lines
571 B
Bash
Executable File
22 lines
571 B
Bash
Executable File
#!/bin/sh
|
|
|
|
ICON_OK="$XDG_DATA_HOME/icons/Haiku/scalable/mimetypes/gnome-mime-video.svg"
|
|
ICON_I="$XDG_DATA_HOME/icons/Haiku/scalable/emblems/emblem-important.svg"
|
|
|
|
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 5000 -i "$ICON_OK" "Grabación Terminada"
|
|
exit
|
|
else
|
|
notify-send -t 5000 -i "$ICON_I" "Grabación inactiva"
|
|
exit 1
|
|
fi
|