create daemon

This commit is contained in:
Your Name
2025-09-29 07:21:46 -04:00
parent 955090b079
commit 69514943a9
1341 changed files with 181418 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
[Unit]
Description=Superball Thrower Daemon
Documentation=https://github.com/superball/thrower
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=superball
Group=superball
WorkingDirectory=/path/to/thrower_daemon
ExecStart=/usr/bin/node daemon.js /etc/superball/config.json
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=superball-thrower
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log/superball
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictNamespaces=true
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
# Resource limits
LimitNOFILE=65536
LimitNPROC=4096
# Environment
Environment=NODE_ENV=production
Environment=NODE_OPTIONS=--max-old-space-size=512
[Install]
WantedBy=multi-user.target