From 02c7eabf53808aa735e6672dde1762e41102a83a Mon Sep 17 00:00:00 2001 From: Thomas Bourdon Date: Fri, 1 Mar 2024 21:28:47 +0700 Subject: [PATCH] network/coturn: Update script. Signed-off-by: Willy Sudiarto Raharjo --- network/coturn/coturn.SlackBuild | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/network/coturn/coturn.SlackBuild b/network/coturn/coturn.SlackBuild index 31d0e20da0..6976e31e7b 100644 --- a/network/coturn/coturn.SlackBuild +++ b/network/coturn/coturn.SlackBuild @@ -29,25 +29,13 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=coturn VERSION=${VERSION:-4.6.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} TURN_USER=${TURN_USER:-turnserver} TURN_GROUP=${TURN_GROUP:-turnserver} -if ! grep -q ^$TURN_GROUP: /etc/group 2>/dev/null ; then - echo " Error: TURN group ($TURN_GROUP) doesn't exist." - echo " Try creating one with: groupadd -g 366 $TURN_GROUP" - exit 1 -fi - -if ! grep -q ^$TURN_USER: /etc/passwd 2>/dev/null ; then - echo " Error: TURN user ($TURN_USER) doesn't exist." - echo " Try creating one with: useradd -u 366 -g $TURN_GROUP -d /var/lib/turn -s /bin/bash $TURN_USER" - exit 1 -fi - if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -64,6 +52,18 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi +if ! grep -q ^$TURN_GROUP: /etc/group 2>/dev/null ; then + echo " Error: TURN group ($TURN_GROUP) doesn't exist." + echo " Try creating one with: groupadd -g 366 $TURN_GROUP" + exit 1 +fi + +if ! grep -q ^$TURN_USER: /etc/passwd 2>/dev/null ; then + echo " Error: TURN user ($TURN_USER) doesn't exist." + echo " Try creating one with: useradd -u 366 -g $TURN_GROUP -d /var/lib/turn -s /bin/bash $TURN_USER" + exit 1 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -114,7 +114,6 @@ make install DESTDIR=$PKG sed 's%/usr/local%/usr/share/turnserver/examples%' $PKG/etc/turnserver.conf.default > $PKG/etc/turnserver.conf.new rm -f $PKG/etc/turnserver.conf.default -rm -f $PKG/usr/share/turnserver/examples/etc/*.pem cp -a examples/ca $PKG/usr/share/turnserver/examples mkdir -p $PKG/etc/{rc.d,logrotate.d}