#!/bin/sh

# SETTINGS
ID=YOURID
PASS=YOURPASS
PATH=/bin:/sbin:/usr/bin:/usr/sbin

# GET INFORMATION
BOOTTIME=$(cat /proc/uptime | awk '{print $1}' | sed -e '1,$ s/\..*//g')
UNAME=$(uname -srm)
CPU=$(lscpu | grep "^Model name" | uniq | awk -F ': ' '{print $2}' | xargs)
OS="${UNAME} - ${CPU}"
HOST=$(hostname)

# CALL API
curl -s --get \
  --data-urlencode "ID=${ID}" \
  --data-urlencode "UPTIME=${UPTIME}" \
  --data-urlencode "OS=${OS}" \
  --data-urlencode "PASS=${PASS}" \
  --data-urlencode "HOST=${HOST}" \
  https://horst.dyndns.org/api/update

