#!/bin/bash # This script pushes the current time to the API's remote management # to track last connected time STATUS_FILE="/var/config/devicehq/status.json" DHQ_DIR="/var/config/devicehq" LAST_CONNECTED=$(date +%m/%d/%Y/%H:%M:%S) INTERVAL="" # Reset in case getopts has been used previously in the shell. OPTIND=1 function show_help() { echo "Usage: $0 -t