6086222503
- Move homelab, Jafner.dev (now called blog) to root. - Rename "archived projects" -> "archive" - Rename "active projects" -> "projects" - Rename "jafner-homebrew" -> "5ehomebrew" - Rename "docker-llm-amd" -> "local-ai"
24 lines
416 B
Bash
24 lines
416 B
Bash
#!/bin/bash
|
|
|
|
source ./webhook_secrets.env
|
|
|
|
generate_post_data() {
|
|
cat <<EOF
|
|
{
|
|
"content": "IP Address Changed",
|
|
"embeds": [{
|
|
"title": "IP Address Changed",
|
|
"description": "New IP: $1",
|
|
"color": "45973"
|
|
}]
|
|
}
|
|
EOF
|
|
}
|
|
|
|
IP=$(curl ipinfo.io/ip)
|
|
|
|
if [ "$IP" != "$(cat ip.tmp)" ]; then
|
|
curl -H "Content-Type: application/json" -X POST -d "$(generate_post_data $IP)" $discord_webhook
|
|
fi
|
|
|
|
echo $IP > ip.tmp |