An automation tool for monitoring and automatically purchasing OVH KSA servers. This tool continuously monitors the availability of KSA servers and automatically completes the purchase process when servers become available, with Telegram notifications.
- Automatic OVH KSA server availability monitoring
- Automatic order placement when servers become available
- Telegram bot notifications
- Multi-distribution Linux support (Debian/Ubuntu/CentOS/Fedora/OpenSUSE/Arch)
- Automatic dependency installation
- Error retry mechanism with detailed logging
- Secure credential handling
- Shopping cart automation with configurable options
- Linux system (root privileges required)
- Python 3
- OVH API credentials
- Telegram Bot Token and Chat ID
- Stable internet connection
Choose one of these three methods to run the script:
bash -c "$(curl -sSL https://raw.githubusercontent.com/wanghui5801/ovh_shell/main/ovh_shell.sh)"
sudo bash -c "$(curl -sSL https://raw.githubusercontent.com/wanghui5801/ovh_shell/main/ovh_shell.sh)"
curl -sSL https://raw.githubusercontent.com/wanghui5801/ovh_shell/main/ovh_shell.sh -o ovh_shell.sh
chmod +x ovh_shell.sh
sudo ./ovh_shell.sh
There are several methods to run the script in the background:
Screen allows you to create a persistent terminal session that continues running even after you disconnect.
# Install screen
sudo apt-get install screen # For Debian/Ubuntu
sudo yum install screen # For CentOS/RHEL
# Create a new screen session
screen -S ovh_monitor
# Run the script
bash -c "$(curl -sSL https://raw.githubusercontent.com/wanghui5801/ovh_shell/main/ovh_shell.sh)"
# Detach from screen session: Press Ctrl+A, then D
# Reattach to screen session:
screen -r ovh_monitor
When running the script, you need to provide the following information:
-
Telegram configuration:
- BOT_TOKEN: Telegram bot token
- CHAT_ID: Chat ID to receive notifications
-
OVH API credentials:
- OVH_ENDPOINT: API endpoint (default: ovh-eu)
- OVH_APPLICATION_KEY: Application key
- OVH_APPLICATION_SECRET: Application secret
- OVH_CONSUMER_KEY: Consumer key
First, you need an OVH account, then create an application in the corresponding region's API system to obtain OVH_APPLICATION_KEY, OVH_APPLICATION_SECRET, and OVH_CONSUMER_KEY.
If you are in the CA region, please create your application through OVH API CA.
If you are in the IE region, please create your application through OVH API IE.
To ensure the script can access the API properly, it is recommended to grant all permissions. The specific settings are as follows:
The final result should look like this:
This will provide you with the required OVH_APPLICATION_KEY, OVH_APPLICATION_SECRET, and OVH_CONSUMER_KEY.
Chat with the official @BotFather to create a Telegram bot. In the conversation, enter commands like /start
, /newbot
, and follow the prompts. You'll receive a new bot and a token in the following format:
987654321:ABCDEF_xdfguweSAExofxT9-wdl4x
Next, send any message to your newly created bot.
Then open https://api.telegram.org/bot<token>/getUpdates
to get your chat ID.
Replace <token>
with the token you received when creating the bot. Now you have both the BOT_TOKEN and CHAT_ID parameters needed for the script.
- Check and install necessary dependencies
- Install Python packages (ovh, requests)
- Collect user configuration information
- Download and run the monitoring script
- Continuously monitor server availability
- Automatically place orders and notify via Telegram when servers become available
- Script includes automatic retry mechanism
- Automatic retry on network errors
- Notify errors via Telegram
- Detailed error logging
- Requires root privileges to run
- Ensure stable network connection
- Keep API credentials secure
- Test Telegram notifications first
This project is licensed under the MIT License - see the LICENSE file for details.
Welcome to submit Issues and Pull Requests!