Added a BASH Script (Crontab) to Check STEEM Container Running
I've running 5 steemd nodes - including two RPC nodes: api.justyy.com and api2.justyy.com
Sometimes the node crashed but I didn't notice for a long time. I then added a simple script that will be executed every 10 minutes in crontab.
#!/bin/bash
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "Docker is not installed. Please install Docker to run this script."
exit 2
fi
# check if steem container is running
container_name="steem"
exist=$(docker ps | grep $container_name | wc -l)
if [ "$exist" -eq 0 ]; then
echo "$container_name container is not running."
## send email using php /var/www/mail.php
msg="Steem container is not running on $(hostname) at $(date)."
### TO ADD: send email here.....
exit 1
else
echo "$container_name container is running."
exit 0
fi
Steem to the Moon🚀!
- You can rent Steem Power via rentsp!
- You can swap the TRON:TRX/USDT/USDD to STEEM via tron2steem!
- You can swap the STEEM/SBD to SUI via steem2sui!
- You can swap the STEEM/SBD to SOL Solana via steem2sol!
- You can swap the STEEM/SBD to ETH Ethereum via steem2eth!
- You can swap the STEEM/SBD to Tether USDT (TRC-20) via steem2usdt!
- You can swap the STEEM/SBD to TRX (TRON) via steem2trx!
- You can swap the STEEM/SBD to BTS (BitShares) via steem2bts!
- Register a free STEEM account at SteemYY!
- Steem Block Explorer
- ChatGPT/Steem Integration: You can type !ask command to invoke ChatGPT
- Steem Witness Table and API
- Other Steem Tools
@justyy, this is incredibly valuable! Running Steem nodes is critical infrastructure, and sharing your practical monitoring script is a fantastic contribution to the community. The simplicity of the
crontab
approach and the clear Docker check make this easily adaptable for other node operators. It's great to see you proactively addressing potential downtime.The inclusion of your various Steem tools and swapping services at the end further solidifies your commitment to the Steem ecosystem. Thank you for sharing this! I'm sure many will find this script useful. Have you considered adding email alerting? Keep up the excellent work!