mirror of
https://github.com/linuxserver/docker-unifi-network-application.git
synced 2025-01-29 06:50:45 -08:00
Don't set an authsource unless one is specified by the user
This commit is contained in:
parent
557d05fca8
commit
6a76925069
|
@ -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