From a23f91cd9d32ad261d00aa92e65ba46d7d426cfc Mon Sep 17 00:00:00 2001 From: aitbc Date: Thu, 2 Apr 2026 14:39:26 +0200 Subject: [PATCH] fix: correct environment file references to use /etc/aitbc/.env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Environment File Correction - Updated all services to use /etc/aitbc/.env instead of /etc/aitbc/production.env - Fixed EnvironmentFile paths in all systemd services - Verified /etc/aitbc/.env exists and contains configuration - Eliminated references to non-existent production.env ✅ Service Configuration - All services now use the correct environment file - Environment variables properly loaded - Service startup should be more reliable - No more missing environment file errors ✅ Production Structure - Single environment file: /etc/aitbc/.env - No duplicate or non-existent environment files - Clean configuration management - Proper FHS compliance 🚀 Environment file references corrected! --- systemd/aitbc-blockchain-http.service | 2 +- systemd/aitbc-blockchain-node.service | 2 +- systemd/aitbc-gpu.service | 2 +- systemd/aitbc-marketplace.service | 2 +- systemd/aitbc-mining-blockchain.service | 2 +- systemd/aitbc-openclaw-ai.service | 2 +- systemd/aitbc-production-monitor.service | 2 +- systemd/aitbc-real-marketplace.service | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/systemd/aitbc-blockchain-http.service b/systemd/aitbc-blockchain-http.service index 9a397d5b..6c69835e 100644 --- a/systemd/aitbc-blockchain-http.service +++ b/systemd/aitbc-blockchain-http.service @@ -11,7 +11,7 @@ Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=BLOCKCHAIN_HTTP_PORT=8005 Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Blockchain HTTP execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/blockchain_http_launcher.py diff --git a/systemd/aitbc-blockchain-node.service b/systemd/aitbc-blockchain-node.service index cd1381f7..ff078f9d 100644 --- a/systemd/aitbc-blockchain-node.service +++ b/systemd/aitbc-blockchain-node.service @@ -11,7 +11,7 @@ WorkingDirectory=/opt/aitbc Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Production execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/blockchain_simple.py diff --git a/systemd/aitbc-gpu.service b/systemd/aitbc-gpu.service index 892bebe6..719c0b6b 100644 --- a/systemd/aitbc-gpu.service +++ b/systemd/aitbc-gpu.service @@ -11,7 +11,7 @@ Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=GPU_MARKETPLACE_PORT=8003 Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Production execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/gpu_marketplace_launcher.py diff --git a/systemd/aitbc-marketplace.service b/systemd/aitbc-marketplace.service index de29221d..900f2a5c 100644 --- a/systemd/aitbc-marketplace.service +++ b/systemd/aitbc-marketplace.service @@ -13,7 +13,7 @@ Environment=NODE_ID=aitbc Environment=MARKETPLACE_PORT=8002 Environment=WORKERS=1 Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Production execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/marketplace.py diff --git a/systemd/aitbc-mining-blockchain.service b/systemd/aitbc-mining-blockchain.service index 31612184..95016651 100644 --- a/systemd/aitbc-mining-blockchain.service +++ b/systemd/aitbc-mining-blockchain.service @@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Real mining execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/mining_blockchain.py diff --git a/systemd/aitbc-openclaw-ai.service b/systemd/aitbc-openclaw-ai.service index 4c3b4911..58155aea 100644 --- a/systemd/aitbc-openclaw-ai.service +++ b/systemd/aitbc-openclaw-ai.service @@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # OpenClaw AI execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/openclaw_ai.py diff --git a/systemd/aitbc-production-monitor.service b/systemd/aitbc-production-monitor.service index 6af764e6..fa6deda0 100644 --- a/systemd/aitbc-production-monitor.service +++ b/systemd/aitbc-production-monitor.service @@ -10,7 +10,7 @@ WorkingDirectory=/opt/aitbc Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Production monitoring ExecStart=/opt/aitbc/venv/bin/python -c "import time; import logging; import json; from pathlib import Path; logging.basicConfig(level=logging.INFO); logger = logging.getLogger('production-monitor'); while True: try: blockchain_file = Path('/var/lib/aitbc/data/blockchain/aitbc/blockchain.json'); if blockchain_file.exists(): with open(blockchain_file, 'r') as f: data = json.load(f); logger.info(f'Blockchain: {len(data.get(\"blocks\", []))} blocks'); marketplace_dir = Path('/var/lib/aitbc/data/marketplace'); if marketplace_dir.exists(): listings_file = marketplace_dir / 'gpu_listings.json'; if listings_file.exists(): with open(listings_file, 'r') as f: listings = json.load(f); logger.info(f'Marketplace: {len(listings)} GPU listings'); import psutil; cpu_percent = psutil.cpu_percent(); memory_percent = psutil.virtual_memory().percent; logger.info(f'System: CPU {cpu_percent}%, Memory {memory_percent}%'); time.sleep(30); except Exception as e: logger.error(f'Monitoring error: {e}'); time.sleep(60)" diff --git a/systemd/aitbc-real-marketplace.service b/systemd/aitbc-real-marketplace.service index e7a08609..3b6cd6a4 100644 --- a/systemd/aitbc-real-marketplace.service +++ b/systemd/aitbc-real-marketplace.service @@ -11,7 +11,7 @@ Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin Environment=NODE_ID=aitbc Environment=REAL_MARKETPLACE_PORT=8009 Environment=PYTHONPATH=/opt/aitbc/services -EnvironmentFile=/etc/aitbc/production.env +EnvironmentFile=/etc/aitbc/.env # Real marketplace execution ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/services/real_marketplace_launcher.py