acdc-botnet-worker@.service
1 [Unit] 2 Description=ACDC Botnet Worker (%i) 3 Documentation=https://source.ac-dc.network/alpha-delta-network/acdc-botnet 4 After=network-online.target 5 Wants=network-online.target 6 # Wait for coordinator to be available 7 After=acdc-botnet-coordinator.service 8 9 [Service] 10 Type=simple 11 User=devops 12 Group=devops 13 WorkingDirectory=/opt/acdc-botnet 14 15 # Load environment from config file (per-instance configuration) 16 EnvironmentFile=-/etc/acdc-botnet/worker-%i.conf 17 18 # Binary location 19 ExecStart=/usr/local/bin/acdc-botnet worker start \ 20 --coordinator ${COORDINATOR_ADDR:-localhost:50051} \ 21 --worker-id ${WORKER_ID:-%i} \ 22 --max-bots ${MAX_BOTS:-300} \ 23 --capabilities ${CAPABILITIES:-trader,user,governor} 24 25 # Resource limits for worker (configurable per instance) 26 # Default: 80% CPU, 16GB RAM for bot operations 27 CPUQuota=${CPU_QUOTA:-80%} 28 MemoryMax=${MEMORY_MAX:-16G} 29 TasksMax=4096 30 31 # Process priority (lower than critical services) 32 Nice=10 33 IOWeight=100 34 35 # Security hardening 36 NoNewPrivileges=true 37 PrivateTmp=true 38 ProtectSystem=strict 39 ProtectHome=true 40 ReadWritePaths=/var/lib/acdc-botnet 41 42 # Logging 43 StandardOutput=journal 44 StandardError=journal 45 SyslogIdentifier=acdc-botnet-worker-%i 46 47 # Restart policy 48 Restart=always 49 RestartSec=15 50 StartLimitInterval=300 51 StartLimitBurst=5 52 53 # Graceful shutdown (allow bots to finish) 54 TimeoutStopSec=60 55 KillMode=mixed 56 KillSignal=SIGTERM 57 58 [Install] 59 WantedBy=multi-user.target