D
D
Drno2020-10-30 12:58:45
linux
Drno, 2020-10-30 12:58:45

How to end the script correctly?

Good day. There is a script to start the player, at startup. It is crammed into the crontab from the root user (as it should be)
, it works, everything is fine, but naturally after the end, it continues to hang in the processes. how to do it right so that after the end, the script stops hanging in the processes? because he worked, he started everything already ...

well, or option 2 - how to hang the player as a service at system startup, tk. link never changes...
Script

#!/bin/bash
sleep 10
pulseaudio -D --system
sleep 10
pactl set-sink-mute 0 false
pactl set-sink-volume 0 100%
sleep 20
php /var/azuracast/www/util/cli.php azuracast:radio:restart
cvlc -I dummy http://localhost:8000/radio.mp3 --loop
exit 0

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2020-10-30
@Drno

Most likely you need
cvlc -I dummy localhost:8000/radio.mp3 --loop &
and "exit 0" is not needed, it can be removed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question