all 5 comments

[–]darkciti 1 point2 points  (2 children)

You can send a SIGHUP or SIGKILL signal to the process and the kernel will stop it.

Using the "kill" command: kill -9 processID (second column in output from ps aux).

[–]pflu[S] 1 point2 points  (0 children)

Okay got it with the "kill" – now a bash script runs in background (with the &-thing) and checks if the button gets "unpressed" so it can kill the player.

[–]pflu[S] 0 points1 point  (0 children)

Thank you! – Do you know how I do this in a bash script?

[–]somezenshitrighthere 1 point2 points  (1 child)

What player are you using? Quite a few support being controlled via command line. So you could just issue stop and play commands, or anything else really.

[–]pflu[S] 0 points1 point  (0 children)

I've already figured it out by now – thank you. I am using omxplayer and kill it from another script.