|
@@ -3,14 +3,12 @@
|
|
|
export DAEMONIZED=1
|
|
|
source $SNAP/helper/functions
|
|
|
|
|
|
-RAND="$(cat /dev/urandom | LC_ALL=C tr -dc '0-9A-F' | fold -w 32 | head -n 1)"
|
|
|
+RAND="$(snapctl get -d session.secret)"
|
|
|
snapctl set transfer="${RAND}"
|
|
|
-snapctl set :zui-store z2mrand="${RAND}"
|
|
|
-lprint "Transfer random: ${RAND}"
|
|
|
+lprint "Secret: ${RAND}"
|
|
|
|
|
|
SNAP_CONFIG="$(snapctl get -d server mqtt session transfer)"
|
|
|
snapctl set :zui-store z2mconfig="${SNAP_CONFIG}"
|
|
|
-
|
|
|
lprint "Export snap config over plug connection: ${SNAP_CONFIG}"
|
|
|
|
|
|
USING_SERIAL="$(snapctl is-connected serial-port && echo 1 || echo 0)"
|