Skip to content
/ oncheck Public

A simple Python script that returns HTTP codes based on a Hypixel player's online status, for use in conjunction with tools like Uptime Kuma.

License

Notifications You must be signed in to change notification settings

xMdb/oncheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oncheck: Hypixel Online Detector and HTTP Server

This is a simple script that checks if a player is online on Hypixel and provides HTTP codes 200 or 500. This is done by using the Hypixel API.

If the player is online, HTTP 200 is returned along with the text, "Username is online".

If the player is offline, HTTP 500 is returned along with the text, "Username is offline".

I use this with Uptime Kuma to monitor if my VM called Majaro Tipster is working.

Manjaro Tipster VM

Usage

Put your Minecraft UUID and Hypixel API key in .env.example and rename it to .env.

Then, run it using python3 main.py.

After, you can add the URL to Uptime Kuma.

Uptime Kuma

Integrate with systemd

You can integrate this with systemd to run it as a service.

Create a file called oncheck.service in /etc/systemd/system/ and put the following in it:

[Unit]
Description=Oncheck Online Detector

[Service]
User=USERNAME
ExecStart=/usr/bin/python3 /path/to/oncheck/main.py
Restart=always

[Install]
WantedBy=multi-user.target

Then, run sudo systemctl daemon-reload and sudo systemctl enable oncheck.service.

You can then start it using sudo systemctl start oncheck.service.

Afterwards, check the status using sudo systemctl status oncheck.service. You should see it running.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple Python script that returns HTTP codes based on a Hypixel player's online status, for use in conjunction with tools like Uptime Kuma.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages