#!/usr/bin/env bash export DAEMONIZED=1 source $SNAP/helper/functions SNAP_CONFIG="$(snapctl get -d server mqtt session)" 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)" snapctl set :zui-store z2mserial="${USING_SERIAL}" lprint "Share serial-port plug be used ($([ "${USING_SERIAL}" -eq 1 ] && echo "True" || "False")) over plug connection."