Repository Public
1# /etc/systemd/system/mcc-agent.service — MacLustr Command Center node agent (unprivileged, hardened).2[Unit]3Description=MacLustr Command Center agent4Documentation=file:///usr/share/doc/mcc-agent/AGENT-PROTOCOL.md5After=network-online.target6Wants=network-online.target78[Service]9Type=simple10User=mcc-agent11Group=mcc-agent12ExecStart=/usr/local/bin/mcc-agent run --state-dir /var/lib/mcc-agent --label mcc-agent.service13# Exit 75 = the agent asks to be restarted (accepted agent.restart command).14Restart=always15RestartSec=1016Environment=GOMEMLIMIT=64MiB17StateDirectory=mcc-agent18StateDirectoryMode=070019MemoryMax=256M20CPUQuota=50%21Nice=522# Hardening: no privilege gain, read-only system, no access to home directories.23NoNewPrivileges=yes24ProtectSystem=strict25ProtectHome=yes26PrivateTmp=yes27PrivateDevices=yes28ProtectKernelTunables=yes29ProtectKernelModules=yes30ProtectKernelLogs=yes31ProtectControlGroups=yes32ProtectClock=yes33ProtectHostname=yes34RestrictSUIDSGID=yes35RestrictRealtime=yes36RestrictNamespaces=yes37LockPersonality=yes38MemoryDenyWriteExecute=yes39SystemCallArchitectures=native40SystemCallFilter=@system-service41RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK42# ICMP echo for net.latency without setuid ping (ping needs it under NoNewPrivileges).43AmbientCapabilities=CAP_NET_RAW44CapabilityBoundingSet=CAP_NET_RAW45UMask=00774647[Install]48WantedBy=multi-user.target49