mirror of
https://github.com/linuxserver/docker-unifi-network-application.git
synced 2025-01-12 22:37:30 -08:00
Merge pull request #37 from linuxserver/authsource
This commit is contained in:
commit
fd26d455ff
|
@ -41,6 +41,6 @@
|
|||
# unifi.throughput.port=6789
|
||||
#
|
||||
db.mongo.local=false
|
||||
db.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~?tls=~MONGO_TLS~&authSource=~MONGO_AUTHSOURCE~
|
||||
statdb.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~_stat?tls=~MONGO_TLS~&authSource=~MONGO_AUTHSOURCE~
|
||||
db.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
|
||||
statdb.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~_stat?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
|
||||
unifi.db.name=~MONGO_DBNAME~
|
||||
|
|
|
@ -48,9 +48,9 @@ if [[ ! -e /config/data/system.properties ]]; then
|
|||
sed -i "s/~MONGO_TLS~/false/" /defaults/system.properties
|
||||
fi
|
||||
if [[ -z "${MONGO_AUTHSOURCE}" ]]; then
|
||||
sed -i "s/~MONGO_AUTHSOURCE~/${MONGO_DBNAME}/" /defaults/system.properties
|
||||
sed -i "s/~MONGO_AUTHSOURCE~//" /defaults/system.properties
|
||||
else
|
||||
sed -i "s/~MONGO_AUTHSOURCE~/${MONGO_AUTHSOURCE}/" /defaults/system.properties
|
||||
sed -i "s/~MONGO_AUTHSOURCE~/\&authSource=${MONGO_AUTHSOURCE}/" /defaults/system.properties
|
||||
fi
|
||||
cp /defaults/system.properties /config/data
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue