Skip to content

Commit

Permalink
fix(sip-jibri): check SYS_ADMIN and /dev/shm before starting
Browse files Browse the repository at this point in the history
  • Loading branch information
emrahcom committed Aug 20, 2024
1 parent c0cac06 commit 18c8d89
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sip-jibri/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/usr/bin/with-contenv bash

# Check if the SYS_ADMIN cap is set
if ! capsh --has-p=cap_sys_admin; then
echo "Required capability SYS_ADMIN is missing"
exit 1
fi

# Check if /dev/shm is large enough (2GB at least)
if ! shm-check; then
echo "/dev/shm must be at least 2GB in size"
exit 1
fi

if [[ -z $SIP_JIBRI_XMPP_PASSWORD || -z $JIBRI_XMPP_PASSWORD ]]; then
echo 'FATAL ERROR: Sip-Jibri XMPP password and auth password must be set'
exit 1
Expand Down

0 comments on commit 18c8d89

Please sign in to comment.