Skip to content

Commit

Permalink
🚑 Skip MySQL container init when database is override by user
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Mar 1, 2020
1 parent 86796dc commit 4eabb94
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions traccar/rootfs/etc/cont-init.d/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4eabb94

Please sign in to comment.