Skip to content

Commit

Permalink
🔨 Refactors add-on to use Hassio ports on the host network
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Apr 22, 2019
1 parent 43b28dc commit 327d29f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions traccar/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,24 @@
"boot": "auto",
"hassio_api": true,
"hassio_role": "default",
"homeassistant_api": false,
"host_network": true,
"ports": {
"8072/tcp": 8072
},
"ports_description": {
"8072/tcp": "Traccar web interface"
},
"map": [
"config:rw",
"ssl"
],
"options": {
"port": 8072,
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
},
"schema": {
"log_level": "match(^(trace|debug|info|notice|warning|error|fatal)$)?",
"port": "port",
"ssl": "bool",
"certfile": "str",
"keyfile": "str"
Expand Down
2 changes: 1 addition & 1 deletion traccar/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ if bashio::config.true 'ssl'; then
sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/nginx.conf
fi

port=$(bashio::config 'port')
port=$(bashio::addon.port 8072)
sed -i "s/%%port%%/${port}/g" /etc/nginx/nginx.conf

0 comments on commit 327d29f

Please sign in to comment.