mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
network/coturn: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
e3d42576f5
commit
02c7eabf53
1 changed files with 13 additions and 14 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue