Last active
April 28, 2023 08:30
-
-
Save mattiasghodsian/229582e8dec95ec40474e2c10266c860 to your computer and use it in GitHub Desktop.
Send GameID to Discord Channel for Core Keeper Dedicated Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Mattias Ghodsian | |
# Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5 | |
# Donate coffee: https://www.buymeacoffee.com/mattiasghodsian | |
filename="path-to-game-file-directory/GameID.txt" | |
m1=$(md5sum "$filename") | |
while true; do | |
sleep 10 | |
m2=$(md5sum "$filename") | |
if [ "$m1" != "$m2" ] ; then | |
gameid=`cat $filename` | |
echo $gameid | |
m1=$(md5sum "$filename") | |
curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"${gameid}\"}" "discord-channel-wehbook-url-here" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment