Get up and running with the Shell Scripting Automation & Health Monitoring Toolkit in 5 minutes!
Verify you have the required tools:
which tar gzip df du systemctlIf any are missing, install them using your package manager.
# Navigate to your home directory
cd ~
# Clone or extract the toolkit
cd Documents/Resume/shell-automation-toolkit
# Make scripts executable (if not already done)
chmod +x automation-toolkit.sh health-monitor.sh modules/*.sh
# Verify installation
./automation-toolkit.sh --help
./health-monitor.sh --helpDisplay help menu:
./automation-toolkit.sh --helpRun a system health check:
./automation-toolkit.sh --healthCreate a test backup:
mkdir -p ~/test-data
echo "Hello, World!" > ~/test-data/sample.txt
./automation-toolkit.sh --backup ~/test-data --verboseList your backups:
./automation-toolkit.sh --list-backupsRun a single health check:
./health-monitor.sh --check --verboseMonitor specific services:
./health-monitor.sh --service ssh --service cron --checkView alerts (if any):
./health-monitor.sh --list-alertsBackup your important directories:
./automation-toolkit.sh --backup ~/Documents
./automation-toolkit.sh --backup ~/ProjectsRun comprehensive health check:
./automation-toolkit.sh --all-healthMonitor critical services with auto-healing:
sudo ./health-monitor.sh --monitor --auto-healPress Ctrl+C to stop continuous monitoring.
Remove files older than 30 days:
./automation-toolkit.sh --cleanup /tmp --verboseCompress large directories to save space:
./automation-toolkit.sh --compress ~/old-projectscrontab -e# Daily backup at 2 AM
0 2 * * * /home/yourusername/Documents/Resume/shell-automation-toolkit/automation-toolkit.sh --backup /home/yourusername/Documents
# Health check every hour
0 * * * * /home/yourusername/Documents/Resume/shell-automation-toolkit/health-monitor.sh --check
# Weekly cleanup of temp files
0 3 * * 0 /home/yourusername/Documents/Resume/shell-automation-toolkit/automation-toolkit.sh --cleanup /tmp
# Daily health report at 8 AM
0 8 * * * /home/yourusername/Documents/Resume/shell-automation-toolkit/automation-toolkit.sh --healthNote: Replace /home/yourusername/ with your actual home directory path.
Edit the configuration file:
nano config/config.confKey settings to adjust:
CPU_THRESHOLD- CPU alert threshold (default: 80%)MEMORY_THRESHOLD- Memory alert threshold (default: 85%)DISK_THRESHOLD- Disk alert threshold (default: 90%)SELF_HEALING- Enable auto-restart of failed services (default: false)
Edit the services configuration:
nano config/services.confAdd services (one per line):
ssh
cron
nginx
mysql
docker
All operations are logged for your reference:
# View automation toolkit log
tail -f logs/automation-toolkit.log
# View health monitor log
tail -f logs/health-monitor.log
# View alerts
tail -f logs/health_alerts.log
# View recovery attempts
cat logs/recovery.logIf you get permission errors:
chmod +x automation-toolkit.sh health-monitor.sh modules/*.shSome operations need root privileges:
sudo ./health-monitor.sh --checkEnsure all required commands are available:
./automation-toolkit.sh --help
# If you see "Missing required dependencies", install them using your package managerHere's a complete workflow to get you started:
# 1. Create test directory
mkdir -p ~/demo-project
echo "Important data" > ~/demo-project/data.txt
# 2. Backup the directory
./automation-toolkit.sh --backup ~/demo-project --verbose
# 3. Run system health check
./automation-toolkit.sh --all-health
# 4. Check service status
./health-monitor.sh --check --verbose
# 5. List all backups
./automation-toolkit.sh --list-backups
# 6. View logs
tail -20 logs/automation-toolkit.log- Read the full README.md for detailed documentation
- Customize configuration in
config/config.conf - Schedule automated tasks using cron
- Explore all features using
--helpflags - Integrate with your workflow based on your needs
| Command | Description |
|---|---|
--backup <path> |
Backup directory/file |
--cleanup <path> |
Remove old files |
--compress <path> |
Compress directory |
--health |
System health report |
--all-health |
Comprehensive health check |
--list-backups |
Show all backups |
--disk-usage <path> |
Show disk usage |
--check |
Run health check once |
--monitor |
Continuous monitoring |
--auto-heal |
Enable auto-restart |
--list-alerts |
Show alerts |
--verbose |
Detailed output |
For detailed information:
./automation-toolkit.sh --help
./health-monitor.sh --helpFor full documentation, see README.md
Happy Automating! 🚀
If you encounter any issues or have questions, refer to the full README.md documentation or check the log files for detailed error messages.