mirror of
https://github.com/m1ngsama/TNT.git
synced 2026-03-25 22:33:51 +00:00
47 lines
904 B
Desktop File
47 lines
904 B
Desktop File
[Unit]
|
|
Description=TNT Terminal Chat Server (Anonymous)
|
|
Documentation=https://github.com/m1ngsama/TNT
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=tnt
|
|
Group=tnt
|
|
ExecStart=/usr/local/bin/tnt
|
|
StateDirectory=tnt
|
|
StateDirectoryMode=0700
|
|
|
|
# Automatic restart on failure for long-term stability
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
# Limit restart rate to prevent thrashing
|
|
StartLimitInterval=300
|
|
StartLimitBurst=5
|
|
|
|
# Security hardening
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/var/lib/tnt
|
|
|
|
# Resource limits for stability
|
|
LimitNOFILE=65536
|
|
LimitNPROC=512
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=tnt
|
|
|
|
# Graceful shutdown
|
|
TimeoutStopSec=30
|
|
|
|
# Environment (can be customized via systemctl edit)
|
|
Environment="PORT=2222"
|
|
Environment="TNT_STATE_DIR=/var/lib/tnt"
|
|
EnvironmentFile=-/etc/default/tnt
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|