tunable TURNDBDIR

libevent.rpm
mom040267 11 years ago
parent 10fdcf9005
commit dafedda0b9
  1. 4
      INSTALL
  2. 8
      Makefile.in
  3. 4
      README.turnadmin
  4. 8
      README.turnserver
  5. 2
      README.turnutils
  6. 13
      configure
  7. 3
      examples/etc/turnserver.conf
  8. 6
      man/man1/turnadmin.1
  9. 10
      man/man1/turnserver.1
  10. 4
      man/man1/turnutils.1
  11. 2
      postinstall.txt
  12. 4
      src/apps/relay/mainrelay.c

@ -85,7 +85,7 @@ Or:
You can change the auxiliary configured destination sub-directories by
setting BINDIR, CONFDIR, MANPREFIX, EXAMPLESDIR, DOCSDIR, LIBDIR, SCHEMADIR,
LOCALSTATEDIR and TURNINCLUDEDIR variables in the
LOCALSTATEDIR, TURNDBDIR and TURNINCLUDEDIR variables in the
configure command line. For example:
$ PREFIX=/opt BINDIR=/opt/bin64 CONFDIR=/opt/conf ./configure
@ -171,7 +171,7 @@ This command will also:
- copy the content of examples subdirectory into
PREFIX/share/examples/turnserver/ directory;
- copy the generated default empty SQLite database from sqlite/turndb
to /var/db/turndb;
to /usr/local/var/db or to /var/db/turndb;
- copy the content of include/turn subdirectory into
PREFIX/include/turn/ directory;
- copy the database schema file turndb/schema.sql into

@ -106,13 +106,13 @@ sqlite/turndb : turndb/schema.sql
${MKDIR} sqlite
${RMCMD} sqlite/turndb
${SQLITE_CMD} sqlite/turndb < turndb/schema.sql
### Install all:
install: all ${MAKE_DEPS}
${MKDIR} ${DESTDIR}${PREFIX}
${MKDIR} ${DESTDIR}${BINDIR}
${MKDIR} ${DESTDIR}${LOCALSTATEDIR}/db
${MKDIR} ${DESTDIR}${TURNDBDIR}
${MKDIR} ${DESTDIR}${MANPREFIX}/man/man1
${MKDIR} ${DESTDIR}${CONFDIR}
${MKDIR} ${DESTDIR}${LIBDIR}
@ -150,7 +150,7 @@ install: all ${MAKE_DEPS}
${INSTALL_DATA} turndb/schema.userdb.redis ${DESTDIR}${SCHEMADIR}
${INSTALL_DATA} turndb/schema.stats.redis ${DESTDIR}${DOCSDIR}
${INSTALL_DATA} turndb/schema.stats.redis ${DESTDIR}${SCHEMADIR}
if [ -f sqlite/turndb ] ; then ${INSTALL_DATA} sqlite/turndb ${DESTDIR}${LOCALSTATEDIR}/db/turndb; fi
if [ -f sqlite/turndb ] ; then ${INSTALL_DATA} sqlite/turndb ${DESTDIR}${TURNDBDIR}/turndb; fi
${INSTALL_DATA} examples/etc/turnserver.conf ${DESTDIR}${CONFDIR}/turnserver.conf.default
${INSTALL_DIR} examples/etc ${DESTDIR}${EXAMPLESDIR}
${INSTALL_DIR} examples/scripts ${DESTDIR}${EXAMPLESDIR}
@ -161,7 +161,7 @@ install: all ${MAKE_DEPS}
deinstall: ${MAKE_DEPS}
${PKILL_PROGRAM} turnserver || ${ECHO_CMD} OK
${RMCMD} ${DESTDIR}${LOCALSTATEDIR}/db/turndb
${RMCMD} ${DESTDIR}${TURNDBDIR}/turndb
${RMCMD} ${DESTDIR}${DOCSDIR}
${RMCMD} ${DESTDIR}${SCHEMADIR}
${RMCMD} ${DESTDIR}${BINDIR}/turnserver

@ -81,7 +81,7 @@ Commands:
Options with required values:
-b, --db, --userdb SQLite user database file name (default - /var/db/turndb or
/usr/local/var/db/turndb).
/usr/local/var/db/turndb or /var/lib/turn/turndb).
See the same option in the turnserver section.
-e, --psql-userdb PostgreSQL user database connection string.
See the --psql-userdb option in the turnserver section.
@ -175,6 +175,8 @@ to see the man page.
/usr/local/var/db/turndb
/var/lib/turn/turndb
/usr/local/etc/turnserver.conf
=====================================

@ -82,7 +82,7 @@ Config file settings:
User database settings:
-b, --db, --userdb SQLite user database file name (default - /var/db/turndb or
/usr/local/var/db/turndb).
/usr/local/var/db/turndb or /var/lib/turn/turndb).
-e, --psql-userdb User database connection string for PostgreSQL.
This database can be used for long-term and short-term
@ -718,7 +718,7 @@ Obviously, only a few users can be set that way, and their credentials are fixed
for the turnserver process lifetime.
2) Users can be stored in SQLite DB. The default SQLite database file is /var/db/turndb
or /usr/local/var/db/turndb.
or /usr/local/var/db/turndb or /var/lib/turn/turndb.
3) Users can be stored in PostgreSQL database, if the turnserver was compiled with PostgreSQL
support. Each time turnserver checks user credentials, it reads the database (asynchronously,
@ -773,7 +773,7 @@ with schema.sql SQL script. With Redis, you do not have to do even that - just r
it will set the users for you (see the turnadmin manuals). If you are using SQLite, then the
turnserver or turnadmin will initialize the empty database, for you, when started. The
TURN server installation process creates an empty initialized SQLite database in the default
location (/var/db/turndb or /usr/local/var/db/turndb, depending on the system).
location (/var/db/turndb or /usr/local/var/db/turndb or /var/lib/turn/turndb, depending on the system).
=================================
@ -850,6 +850,8 @@ FILES
/usr/local/var/db/turndb
/var/lib/turn/turndb
/usr/local/etc/turnserver.conf
=================================

@ -255,6 +255,8 @@ FILES
/usr/local/var/db/turndb
/var/lib/turn/turndb
/usr/local/etc/turnserver.conf
=================================

13
configure vendored

@ -351,6 +351,11 @@ do
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* | --localstate=* | --localstat=*)
LOCALSTATEDIR=$ac_optarg ;;
-turndbdir | --turndbdir | --turndbdi | --turndbd | --turndb | --turnd)
ac_prev=TURNDBDIR ;;
-turndbdir=* | --turndbdir=* | --turndbdi=* | --turndbd=* | --turndb=* | --turnd=*)
TURNDBDIR=$ac_optarg ;;
-datadir | --datadir | --datadi | --datad | -schemadir | --schemadir)
ac_prev=SCHEMADIR ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | -schemadir=* | --schemadir=*)
@ -1100,6 +1105,10 @@ else
SQLITE_CMD=${ECHO_CMD}
fi
if [ -z "${TURNDBDIR}" ] ; then
TURNDBDIR=${LOCALSTATEDIR}/db
fi
###########################
# Test PostgreSQL
###########################
@ -1199,7 +1208,7 @@ fi
# So, what we have now:
###############################
OSCFLAGS="${OSCFLAGS} ${TURN_NO_THREAD_BARRIERS} ${TURN_NO_DTLS} ${TURN_NO_GCM} ${TURN_NO_TLS} -DINSTALL_PREFIX=${PREFIX} -DTURNDB=${LOCALSTATEDIR}/db/turndb"
OSCFLAGS="${OSCFLAGS} ${TURN_NO_THREAD_BARRIERS} ${TURN_NO_DTLS} ${TURN_NO_GCM} ${TURN_NO_TLS} -DINSTALL_PREFIX=${PREFIX} -DTURNDB=${TURNDBDIR}/turndb"
if ! [ -z "${TURN_ACCEPT_RPATH}" ] ; then
if [ -z "${TURN_DISABLE_RPATH}" ] ; then
@ -1232,6 +1241,8 @@ ${ECHO_CMD} "BINDIR = ${BINDIR}" >> Makefile
${ECHO_CMD} "bindir = ${BINDIR}" >> Makefile
${ECHO_CMD} "LOCALSTATEDIR = ${LOCALSTATEDIR}" >> Makefile
${ECHO_CMD} "localstatedir = ${LOCALSTATEDIR}" >> Makefile
${ECHO_CMD} "TURNDBDIR = ${TURNDBDIR}" >> Makefile
${ECHO_CMD} "turndbdir = ${TURNDBDIR}" >> Makefile
${ECHO_CMD} "CONFDIR = ${CONFDIR}" >> Makefile
${ECHO_CMD} "confdir = ${CONFDIR}" >> Makefile
${ECHO_CMD} "MANPREFIX = ${MANPREFIX}" >> Makefile

@ -246,7 +246,8 @@
# SQLite database file name.
#
# Default file name is /var/db/turndb or /usr/local/var/db/turndb.
# Default file name is /var/db/turndb or /usr/local/var/db/turndb or
# /var/lib/turn/turndb.
#
#userdb=/var/db/turndb

@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
.TH TURN 1 "21 November 2014" "" ""
.TH TURN 1 "23 November 2014" "" ""
.SH GENERAL INFORMATION
\fIturnadmin\fP is a TURN administration tool. This tool can be used to manage
@ -133,7 +133,7 @@ Options with required values:
.B
\fB\-b\fP, \fB\-\-db\fP, \fB\-\-userdb\fP
SQLite user database file name (default \- /var/db/turndb or
/usr/local/var/db/turndb).
/usr/local/var/db/turndb or /var/lib/turn/turndb).
See the same option in the \fIturnserver\fP section.
.TP
.B
@ -266,6 +266,8 @@ to see the man page.
.PP
/usr/local/var/db/turndb
.PP
/var/lib/turn/turndb
.PP
/usr/local/etc/turnserver.conf
.PP
=====================================

@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
.TH TURN 1 "21 November 2014" "" ""
.TH TURN 1 "23 November 2014" "" ""
.SH GENERAL INFORMATION
The \fBTURN Server\fP project contains the source code of a TURN server and TURN client
@ -133,7 +133,7 @@ User database settings:
.B
\fB\-b\fP, \fB\-\-db\fP, \fB\-\-userdb\fP
SQLite user database file name (default \- /var/db/turndb or
/usr/local/var/db/turndb).
/usr/local/var/db/turndb or /var/lib/turn/turndb).
.TP
.B
\fB\-e\fP, \fB\-\-psql\-userdb\fP
@ -973,7 +973,7 @@ Obviously, only a few users can be set that way, and their credentials are fixed
for the \fIturnserver\fP process lifetime.
.IP 2) 4
Users can be stored in SQLite DB. The default SQLite database file is /var/db/turndb
or /usr/local/var/db/turndb.
or /usr/local/var/db/turndb or /var/lib/turn/turndb.
.IP 3) 4
Users can be stored in PostgreSQL database, if the \fIturnserver\fP was compiled with PostgreSQL
support. Each time \fIturnserver\fP checks user credentials, it reads the database (asynchronously,
@ -1028,7 +1028,7 @@ with schema.sql SQL script. With Redis, you do not have to do even that \- just
it will set the users for you (see the \fIturnadmin\fP manuals). If you are using SQLite, then the
\fIturnserver\fP or \fIturnadmin\fP will initialize the empty database, for you, when started. The
TURN server installation process creates an empty initialized SQLite database in the default
location (/var/db/turndb or /usr/local/var/db/turndb, depending on the system).
location (/var/db/turndb or /usr/local/var/db/turndb or /var/lib/turn/turndb, depending on the system).
.PP
=================================
.SH LIBRARIES
@ -1105,6 +1105,8 @@ it would affect the performance.
.PP
/usr/local/var/db/turndb
.PP
/var/lib/turn/turndb
.PP
/usr/local/etc/turnserver.conf
.PP
=================================

@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man
.TH TURN 1 "21 November 2014" "" ""
.TH TURN 1 "23 November 2014" "" ""
.SH GENERAL INFORMATION
A set of turnutils_* programs provides some utility functionality to be used
@ -378,6 +378,8 @@ to see the man page.
.PP
/usr/local/var/db/turndb
.PP
/var/lib/turn/turndb
.PP
/usr/local/etc/turnserver.conf
.PP
=================================

@ -17,7 +17,7 @@ service, you have to:
as Redis status & statistics database schema description.
If you are using SQLite, the default database location is in
/var/db/turndb or in /usr/local/var/db/turndb.
/var/db/turndb or in /usr/local/var/db/turndb or in /var/lib/turn/turndb.
c) add whatever is necessary to enable start-up daemon for the
/usr/local/bin/turnserver.

@ -438,7 +438,7 @@ static char Usage[] = "Usage: turnserver [options]\n"
" -c <filename> Configuration file name (default - turnserver.conf).\n"
#if !defined(TURN_NO_SQLITE)
" -b, , --db, --userdb <filename> SQLite database file name; default - /var/db/turndb or\n"
" /usr/local/var/db/turndb.\n"
" /usr/local/var/db/turndb or /var/lib/turn/turndb.\n"
#endif
#if !defined(TURN_NO_PQ)
" -e, --psql-userdb, --sql-userdb <conn-string> PostgreSQL database connection string, if used (default - empty, no PostreSQL DB used).\n"
@ -613,7 +613,7 @@ static char AdminUsage[] = "Usage: turnadmin [command] [options]\n"
"\nOptions with mandatory values:\n\n"
#if !defined(TURN_NO_SQLITE)
" -b, --db, --userdb SQLite database file, default value is /var/db/turndb or\n"
" /usr/local/var/db/turndb.\n"
" /usr/local/var/db/turndb or /var/lib/turn/turndb.\n"
#endif
#if !defined(TURN_NO_PQ)
" -e, --psql-userdb, --sql-userdb PostgreSQL user database connection string, if PostgreSQL DB is used.\n"

Loading…
Cancel
Save