31 lines
834 B
Python
31 lines
834 B
Python
#!/usr/bin/env python3
|
|
"""Health check script for the Hermes runtime environment."""
|
|
|
|
import sys
|
|
import platform
|
|
|
|
def main():
|
|
# Verify Python 3 is working
|
|
if sys.version_info.major < 3:
|
|
print("FAIL: Python 3 required", file=sys.stderr)
|
|
sys.exit(1)
|
|
|
|
# Check key Hermes directories exist
|
|
import os
|
|
hermes_dirs = [
|
|
"/root/.hermes",
|
|
"/root/.hermes/profiles/spark",
|
|
"/root/.hermes/cache",
|
|
]
|
|
|
|
for d in hermes_dirs:
|
|
if not os.path.isdir(d):
|
|
print(f"WARN: {d} not found", file=sys.stderr)
|
|
|
|
print(f"Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}")
|
|
print(f"Platform: {platform.system()} {platform.release()}")
|
|
print("OK: Environment healthy")
|
|
sys.exit(0)
|
|
|
|
if __name__ == "__main__":
|
|
main() |