mirror of
https://github.com/hassio-addons/addon-traccar.git
synced 2025-05-04 19:11:31 +00:00
🚑 Skip MySQL container init when database is override by user
This commit is contained in:
parent
86796dcfd0
commit
4eabb944df
1 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,14 @@ declare port
|
||||||
declare username
|
declare username
|
||||||
declare url
|
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
|
if bashio::services.available "mysql"; then
|
||||||
host=$(bashio::services "mysql" "host")
|
host=$(bashio::services "mysql" "host")
|
||||||
password=$(bashio::services "mysql" "password")
|
password=$(bashio::services "mysql" "password")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue