#!/bin/ash #shellcheck shell=dash # . /recalbox/share/system/configs/savesync/savesync.conf touch "$LOG_FILE" mosquitto_pub -h 127.0.0.1 -p 1883 -t "$TOPIC" "SaveLogStart=1" mosquitto_sub -h 127.0.0.1 -p 1883 -t "$TOPIC" | while IFS="=" read -r key value do case "$key" in "SaveLog") printf "%s\n" "$value" >> "$LOG_FILE" ;; esac done