When started this way a 'wineconsole --use-event=52' process is spawned that consumes all available cpu. I've read that this is a side effect of stdin being attached to /dev/null when run in the background like this, and that seems to be accurate; when I launch from a shell there is no such problem.
I've successfully attached stdin to /dev/tty42 in my unit file now, but because there are so many layers between the service and the actual resulting processes that I suspect those processes are not inheriting this setting.
t2server.service:
Code: Select all
[Unit]
Description=Tribes 2 Dedicated Server
Requires=network.target
After=network.target
[Service]
Type=simple
Environment=TERM=xterm-256color
Environment=PYTHONUNBUFFERED=1
User=t2server
CPUAffinity=0
ExecStart=/usr/local/bin/t2server/t2server
ExecStop=/usr/bin/wineserver -k
Restart=on-failure
RestartSec=10s
TimeoutStopSec=60s
WorkingDirectory=/opt/t2server/GameData
LogsDirectory=t2server
StandardInput=tty-force
StandardOutput=tty-force
TTYPath=/dev/tty42
DeviceAllow=/dev/tty42
ProtectSystem=full
ProtectHome=true
SystemCallFilter=@system-service
NoNewPrivileges=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
ProtectClock=true
ProtectHostname=true
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Code: Select all
wineconsole --backend=curses cmd /c Tribes2.exe -dedicated {args}
Code: Select all
wineconsole --backend=curses Tribes2.exe -dedicated {args}
xvfb-run -a wine Tribes2.exe -dedicated {args}
xvfb-run -a wineconsole Tribes2.exe -dedicated {args}
xvfb-run -a wineconsole --backend=curses Tribes2.exe -dedicated {args}
dtach -c ~/console wineconsole --backend=curses Tribes2.exe -dedicated {args}
screen -dmS t2server wineconsole --backend=curses Tribes2.exe -dedicated {args}
I'm hoping maybe someone here might know the secret ingredient I'm missing.