Skip to content

Commit fd26d45

Browse files
authored
Merge pull request #37 from linuxserver/authsource
2 parents 557d05f + 6a76925 commit fd26d45

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

root/defaults/system.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@
4141
# unifi.throughput.port=6789
4242
#
4343
db.mongo.local=false
44-
db.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~?tls=~MONGO_TLS~&authSource=~MONGO_AUTHSOURCE~
45-
statdb.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~_stat?tls=~MONGO_TLS~&authSource=~MONGO_AUTHSOURCE~
44+
db.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
45+
statdb.mongo.uri=mongodb://~MONGO_USER~:~MONGO_PASS~@~MONGO_HOST~:~MONGO_PORT~/~MONGO_DBNAME~_stat?tls=~MONGO_TLS~~MONGO_AUTHSOURCE~
4646
unifi.db.name=~MONGO_DBNAME~

root/etc/s6-overlay/s6-rc.d/init-unifi-network-application-config/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ if [[ ! -e /config/data/system.properties ]]; then
4848
sed -i "s/~MONGO_TLS~/false/" /defaults/system.properties
4949
fi
5050
if [[ -z "${MONGO_AUTHSOURCE}" ]]; then
51-
sed -i "s/~MONGO_AUTHSOURCE~/${MONGO_DBNAME}/" /defaults/system.properties
51+
sed -i "s/~MONGO_AUTHSOURCE~//" /defaults/system.properties
5252
else
53-
sed -i "s/~MONGO_AUTHSOURCE~/${MONGO_AUTHSOURCE}/" /defaults/system.properties
53+
sed -i "s/~MONGO_AUTHSOURCE~/\&authSource=${MONGO_AUTHSOURCE}/" /defaults/system.properties
5454
fi
5555
cp /defaults/system.properties /config/data
5656
fi

0 commit comments

Comments
 (0)