소스 검색

short-term credentials script changed to use sqlite

mom040267 11 년 전
부모
커밋
46392bf738
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 6
      examples/scripts/shorttermsecure/secure_relay_short_term_mech.sh

+ 3 - 6
examples/scripts/shorttermsecure/secure_relay_short_term_mech.sh

@@ -4,8 +4,7 @@
 # secure mode with short-term security mechanism - see option -A
 # that means "use short-term credential mechanism".
 #
-# The short-term credentials mechanism must be used with PostgreSQL or 
-# MySQL database only, the flat file userdb cannot be used.
+# The user credentials are stored in the database.
 #
 # We listen on available interfaces here, and we use the "external" IPs
 # for relay endpoints allocation.
@@ -16,9 +15,7 @@
 # 2) use fingerprints (-f)
 # 3) use 3 relay threads (-m 3)
 # 4) use min UDP relay port 32355 and max UDP relay port 65535
-# 5) --mysql-userdb="host=localhost dbname=coturn user=turn password=turn connect_timeout=30" 
-# means that local MySQL database "coturn" will be used, with database user "turn" and 
-# database user password "turn", and connection timeout 30 seconds.
+# 5) --db="var/db/turndb" means that SQLite database "var/db/turndb" will be used.
 # 6) "--cert=example_turn_server_cert.pem" sets the OpenSSL certificate file name. 
 # 7) "--pkey=example_turn_server_pkey.pem" sets the OpenSSL private key name.
 # 8) "--log-file=stdout" means that all log output will go to the stdout.
@@ -34,4 +31,4 @@ fi
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib/:/usr/local/mysql/lib/
 export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/lib/:/usr/local/mysql/lib/
 
-PATH="./bin/:../bin/:../../bin/:${PATH}" turnserver -v --syslog -A --max-bps=3000000 -f -m 3 --min-port=32355 --max-port=65535  --mysql-userdb="host=localhost dbname=coturn user=turn password=turn connect_timeout=30" --cert=turn_server_cert.pem --pkey=turn_server_pkey.pem --log-file=stdout -E 127.0.0.1 -E ::1 --cipher-list=ALL:SSLv2 $@
+PATH="./bin/:../bin/:../../bin/:${PATH}" turnserver -v --syslog -A --max-bps=3000000 -f -m 3 --min-port=32355 --max-port=65535  --db="var/db/turndb" --cert=turn_server_cert.pem --pkey=turn_server_pkey.pem --log-file=stdout -E 127.0.0.1 -E ::1 --cipher-list=ALL:SSLv2 $@