Browse Source

Change how snap config is shared

Joachim M. Giæver 1 year ago
parent
commit
b2a6e2007c
2 changed files with 4 additions and 2 deletions
  1. 1 2
      src/helper/functions
  2. 3 0
      src/hooks/prepare-plug-zui-store

+ 1 - 2
src/helper/functions

@@ -54,8 +54,7 @@ function cpy_2_zui {
 			mv "${SNAP_COMMON}/zui-store/zwave"*.{log,json} "${SNAP_COMMON}/zui-store/logs/zwave-js"
 			mv "${SNAP_COMMON}/zui-store/logs" "${SNAP_COMMON}/zui-store/.old-z2m-logs"
 			rm -rf "${SNAP_COMMON}/zui-store/.ext-config"
-			snapctl get -d server mqtt session > "${SNAP_COMMON}/zui-store/snap.config"
-
+			touch "${SNAP_DATA}/fresh-z2m-cpy"
 		else
 			echo "Missing directory ${SNAP_COMMON}/zui-store, cannot write to it. Exiting..." >&2
 			exit 1

+ 3 - 0
src/hooks/prepare-plug-zui-store

@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+snapctl set :zui-store plugattribute="$(snapctl get -d server mqtt session)"