โ๏ธ Script Reference โ Kai Voss Sysadmin Toolbox¶
This section provides usage details and examples for key Bash scripts included in the toolbox. Each script is modular, CLI-friendly, and designed for real-world sysadmin tasks.
๐ system-healthcheck.sh¶
Path: scripts/standalone/system-healthcheck.sh
Performs a full system diagnostic: - Disk space - Memory - Uptime - Service status
Usage:
./scripts/standalone/system-healthcheck.sh --log ~/health.log
Flags:
- --log <file>: Save output to log file
- --quiet: Minimal output
- --help: Show usage help
๐ log-analyzer.sh¶
Path: scripts/standalone/log-analyzer.sh
Scans a given log file for critical keywords or patterns (e.g. auth, fail, error).
Usage:
./scripts/standalone/log-analyzer.sh /var/log/syslog ssh
Flags:
- --case-insensitive: Case-insensitive search
- --highlight: Highlight matches
- --help: Show usage
๐ฉบ healthcheck-lite.sh¶
Path: scripts/standalone/healthcheck-lite.sh
Lightweight version of the full healthcheck for quick server spot-checks.
Usage:
./scripts/standalone/healthcheck-lite.sh
Outputs a compact summary: - Load - Disk usage - System uptime
๐งน cleanup-temp.sh¶
Path: scripts/cleanup/cleanup-temp.sh
Cleans temporary files from /tmp, with --dry-run support for safe preview.
Usage:
./scripts/cleanup/cleanup-temp.sh --dry-run
Flags:
- --dry-run: Preview deletions without executing
- --verbose: Show files being deleted
- --help: Show usage
๐พ quick-backup.sh¶
Path: scripts/backup/quick-backup.sh
Performs quick backups of defined folders using tar.
Usage:
./scripts/backup/quick-backup.sh --source /etc --dest /backups
Flags:
- --source <path>: Source directory
- --dest <path>: Destination path
- --log <file>: Log output to file
๐งฐ ops-functions.sh (Library)¶
Path: scripts/lib/ops-functions.sh
A helper script used as a library by other scripts. Not executed directly.
Provides functions like:
- log_info, log_error
- assert_root
- run_step
To use:
source ./scripts/lib/ops-functions.sh
๐ Usage Notes¶
- All scripts support
--helpand fail safely if misused. - Combine scripts with cron, systemd timers, or GitLab CI for automation.
- Always run with
--dry-runbefore enabling in production.
๐ฆ Related SOPs¶
- Maintenance: Log Rotation Verification
- Automation: Secure Secrets Handling
- Incidents: Full Disk Space