#!/bin/bash ETH_IP=$(ip addr | grep en | grep -Po 'inet \K[\d.]+' | tr '\n' ',') WIFI_IP=$(ip addr | grep wlp | grep -Po 'inet \K[\d.]+' | tr '\n' ',') DATE=$(date) HOSTNAME=$(hostname) curl --user device:1230981203sadadlsjkj \ -X POST \ "https://croucher.vivoh.com/record?name="$HOSTNAME \ -H 'Content-Type: text/plain' \ -d '{"last_time":"'"$DATE"'","device_id":"'"$HOSTNAME"'","internal_ip_eth":"'"$ETH_IP"'","internal_ip_wifi":"'"$WIFI_IP"'"}'
*/5 * * * * /home/vivoh/ping.sh