Skip to content

Commit

Permalink
refactor mosquitto state management (#17)
Browse files Browse the repository at this point in the history
* default to mosquitto conf based in the image

* install mosquitto first to avoid overriding existing configuration
  • Loading branch information
reubenmiller authored Dec 3, 2023
1 parent 447fcc5 commit 8ed76ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion recipes/mosquitto/recipe.toml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
description = "install latest mosquitto version"
description = "install latest mosquitto version"
priority = 200_000 # Execut before thin-edge.io
2 changes: 1 addition & 1 deletion recipes/mosquitto/steps/00-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
echo 'deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian sid main' > /etc/apt/sources.list.d/debian-sid.list
apt-get update

DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Options::=--force-confnew -y --no-install-recommends install \
DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Options::=--force-confold -y --no-install-recommends install \
mosquitto \
mosquitto-clients

Expand Down
3 changes: 0 additions & 3 deletions recipes/persist-data/files/data.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[[persist]]
directory = "/data"

[[persist]]
directory = "/var/lib/mosquitto"
3 changes: 2 additions & 1 deletion recipes/thin-edge.io/files/tedge-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ directory = "/etc/tedge"
[[persist]]
directory = "/var/log/tedge"

# mosquitto db file must be persisted
[[persist]]
directory = "/etc/mosquitto"
directory = "/var/lib/mosquitto"

0 comments on commit 8ed76ec

Please sign in to comment.