✅ Log Migration - Moved repository logs to /var/log/aitbc/repository-logs - Moved production logs to /var/log/aitbc/production - Updated all code references to use /var/log/aitbc - Updated systemd services to use system logs - Removed logs from git tracking - Updated .gitignore for log files - Created proper system log structure - Set proper permissions for system logs ✅ System Compliance - All logs now in /var/log/aitbc (FHS compliant) - No log files in repository - Proper system-wide log location - Centralized log management ✅ Service Updates - Production services use /var/log/aitbc/production - SystemD services use /var/log/aitbc - All code references updated to system paths - Services restart and test successfully 🚀 AITBC logging now follows proper system standards!
46 lines
987 B
Desktop File
46 lines
987 B
Desktop File
[Unit]
|
|
Description=AITBC Real Mining Blockchain Service
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
Group=root
|
|
WorkingDirectory=/opt/aitbc
|
|
Environment=PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin
|
|
Environment=NODE_ID=aitbc
|
|
Environment=PYTHONPATH=/opt/aitbc/production/services
|
|
EnvironmentFile=/opt/aitbc/production/.env
|
|
|
|
# Real mining execution
|
|
ExecStart=/opt/aitbc/venv/bin/python /opt/aitbc/production/services/mining_blockchain.py
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=mixed
|
|
TimeoutStopSec=10
|
|
|
|
# Mining reliability
|
|
Restart=always
|
|
RestartSec=5
|
|
StartLimitBurst=5
|
|
StartLimitIntervalSec=60
|
|
|
|
# Mining logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=aitbc-mining-blockchain
|
|
|
|
# Mining security
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/var/lib/aitbc/data/blockchain /var/log/aitbc/production/blockchain
|
|
|
|
# Mining performance
|
|
LimitNOFILE=65536
|
|
LimitNPROC=4096
|
|
MemoryMax=4G
|
|
CPUQuota=80%
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|