From 88a79acee55fbf3ba3d10146e8f75003efa5e3be Mon Sep 17 00:00:00 2001 From: paspo Date: Thu, 22 Nov 2018 10:10:59 +0100 Subject: [PATCH] updated storage location --- ot-recorder/config.json | 2 +- ot-recorder/config.mk | 2 +- ot-recorder/run.sh | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ot-recorder/config.json b/ot-recorder/config.json index 1495f3d..e394db2 100644 --- a/ot-recorder/config.json +++ b/ot-recorder/config.json @@ -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", diff --git a/ot-recorder/config.mk b/ot-recorder/config.mk index 2269387..042087b 100644 --- a/ot-recorder/config.mk +++ b/ot-recorder/config.mk @@ -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 diff --git a/ot-recorder/run.sh b/ot-recorder/run.sh index a28b213..7f4edc2 100644 --- a/ot-recorder/run.sh +++ b/ot-recorder/run.sh @@ -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