🚑 Skip MySQL container init when database is override by user

This commit is contained in:
Franck Nijhof 2020-03-01 17:39:20 +01:00
parent 86796dcfd0
commit 4eabb944df
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -10,6 +10,14 @@ declare port
declare username
declare url
if bashio::fs.file_exists "/config/traccar.xml"; then
if xmlstarlet sel -t -v "/properties/entry[@key='database.driver']" \
"/config/traccar.xml" >/dev/null 2>&1;
then
exit 0
fi
fi
if bashio::services.available "mysql"; then
host=$(bashio::services "mysql" "host")
password=$(bashio::services "mysql" "password")