mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2025-04-22 12:13:26 +00:00
14 lines
590 B
Bash
Executable file
14 lines
590 B
Bash
Executable file
#!/bin/bash
|
|
|
|
HOSTNAME=$(hostname)
|
|
IP_ADDRESS=$(hostname -I | cut -d " " -f 1)
|
|
|
|
DISTRO_VERSION=$(cat /etc/os-release | grep -w "VERSION_ID" | cut -d "=" -f 2)
|
|
DISTRO_VERSION=${DISTRO_VERSION//\"/} # Remove quotes from version string
|
|
|
|
DISTRO_NAME=$(cat /etc/os-release | grep -w "NAME" | cut -d "=" -f 2)
|
|
DISTRO_NAME=${DISTRO_NAME//\"/} # Remove quotes from name string
|
|
|
|
LOG_JSON='{"os": "'$DISTRO_NAME-$DISTRO_VERSION'", "host_name": "'$HOSTNAME'", "ip": "'$IP_ADDRESS'"}'
|
|
|
|
curl -s https://phyrepanel.com/api/phyre-installation-log -X POST -H "Content-Type: application/json" -d "$LOG_JSON"
|