Debugging stuff
This commit is contained in:
@@ -19,7 +19,9 @@ log() {
|
|||||||
PAYLOAD=$(cat "$EVENT_FILE")
|
PAYLOAD=$(cat "$EVENT_FILE")
|
||||||
|
|
||||||
# 4. Check Connection quickly (1 second max)
|
# 4. Check Connection quickly (1 second max)
|
||||||
nc -z -w 1 "$RCLONE_ENDPOINT" "$RCLONE_PORT" || { log "ERROR" "Offline"; exit 1; }
|
#nc -z -w 1 "$RCLONE_ENDPOINT" "$RCLONE_PORT" || { log "ERROR" "Offline"; exit 1; }
|
||||||
|
log "DEBUG" "Checking connection to: ${RCLONE_ENDPOINT}:${RCLONE_PORT}"
|
||||||
|
nc -zv -w 1 "$RCLONE_ENDPOINT" "$RCLONE_PORT" 2>&1 | log "DEBUG" "$(cat)"
|
||||||
|
|
||||||
# 5. Publish Request
|
# 5. Publish Request
|
||||||
if mosquitto_pub -h 127.0.0.1 -p 1883 -t "$TOPIC" -m "$PAYLOAD"; then
|
if mosquitto_pub -h 127.0.0.1 -p 1883 -t "$TOPIC" -m "$PAYLOAD"; then
|
||||||
|
|||||||
@@ -7,3 +7,5 @@ export REMOTE_BASE="saves:gamepi-tv"
|
|||||||
export TOPIC="/Recalbox/SaveSync/Event"
|
export TOPIC="/Recalbox/SaveSync/Event"
|
||||||
export LOG_TOPIC="/Recalbox/SaveSync/Service"
|
export LOG_TOPIC="/Recalbox/SaveSync/Service"
|
||||||
export RESPONSE_TOPIC="/Recalbox/SaveSync/Response"
|
export RESPONSE_TOPIC="/Recalbox/SaveSync/Response"
|
||||||
|
export RCLONE_ENDPOINT="192.168.88.11"
|
||||||
|
export RCLONE_PORT="22"
|
||||||
|
|||||||
Reference in New Issue
Block a user