Skip to content

Commit

Permalink
jibri: fix case when /dev/snd is not bound (jitsi#240 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
netaskd authored and saghul committed Apr 23, 2020
1 parent 125775a commit 4426ed8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jibri/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ fi
&& ( echo -e "\e[31mERROR: Please load snd-aloop module on the docker host.\e[39m"; kill 1; exit 1 )

# get host's audio group id
host_audio_group="$(stat -c %g /dev/snd/pcmC0D0p)"
host_audio_group="$(stat -c %g /dev/snd/pcmC0D0p 2>/dev/null)"

# audio group is not found. Has it been run without jibri.yml?
[ -z "${host_audio_group}" ] \
&& ( echo -e "\e[31mERROR: Binding /dev/snd is not found. Please check that you run docker-compose with -f jibri.yml.\e[39m"; kill 1; exit 1 )

# try to create group with this id. If group with the id already exists, just skip
groupadd -g ${host_audio_group} jibri-audio >/dev/null 2>&1
# include user to the group by id
Expand Down

0 comments on commit 4426ed8

Please sign in to comment.