12345678910111213141516171819 |
- #!/usr/bin/env bash
- 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)"
- snapctl set transfer="${RAND}"
- snapctl set :zui-store z2mrand="${RAND}"
- lprint "Transfer random: ${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)"
- snapctl set :zui-store z2mserial="${USING_SERIAL}"
- lprint "Share serial-port plug be used (${USING_SERIAL}) over plug connection."
|