network/coturn: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Thomas Bourdon 2024-03-01 21:28:47 +07:00 committed by Willy Sudiarto Raharjo
parent e3d42576f5
commit 02c7eabf53
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -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}