updated storage location

This commit is contained in:
Paolo Asperti 2018-11-22 10:10:59 +01:00
parent 90870afb19
commit 88a79acee5
3 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "Owntracks Recorder",
"url": "https://git.asperti.com/paspo/hassio-addons",
"version": "0.1.1",
"version": "0.1.2",
"slug": "ot-recorder",
"description": "Owntracks Recorder - connects to your mqtt broker and consumes owntracks locations",
"startup": "before",

View File

@ -7,7 +7,7 @@ WITH_PING ?= yes
WITH_KILL ?= no
WITH_ENCRYPT ?= yes
WITH_GREENWICH ?= no
STORAGEDEFAULT = /owntracks/
STORAGEDEFAULT = /share/ot-recorder/
DOCROOT = /var/spool/owntracks/recorder/htdocs
GHASHPREC = 7
JSON_INDENT ?= no

View File

@ -12,7 +12,7 @@ PASS=$(jq --raw-output ".pass" $CONFIG_PATH)
QOS=$(jq --raw-output ".qos" $CONFIG_PATH)
echo "
OTR_STORAGEDIR = \"/owntracks\"
OTR_STORAGEDIR = \"/share/ot-recorder\"
OTR_TOPICS = \"$TOPICS\"
OTR_HOST = \"$HOST\"
OTR_PORT = $PORT
@ -21,7 +21,11 @@ OTR_PASS = \"$PASS\"
OTR_QOS = $QOS
" > /etc/ot-recorder.cfg
if [ ! -f /owntracks/ghash/data.mdb ] ; then
if [ ! -d /share/ot-recorder ] ; then
mkdir /share/ot-recorder
fi
if [ ! -f /share/ot-recorder/ghash/data.mdb ] ; then
/usr/sbin/ot-recorder --initialize
fi