This is my curl script
#!/bin/bash
PING_STATUS="$(netcat -vz mc.bella.wtf 25565 2>&1)"
curl -H "Content-Type: application/json" -X POST -d '{"embeds": [{"title": "Server Status:","color": 16027903,"description": "'"$PING_STATUS"'"}]}' "$WEBHOOK"
This is what I get when I run my crontab:
mc@ubuntu:~$ crontab -l
* * * * * /home/mc/server/ping >/tmp/mycommand.log 2>&1
mc@ubuntu:~$ cat /tmp/mycommand.log
curl: (3) <url> malformed
Why is my url malformed when it works fine when running the script by itself?