56 lines
1.3 KiB
Desktop File
56 lines
1.3 KiB
Desktop File
[Unit]
|
|
Description=TeamSpeak 3 Client with Echoion Music Bot
|
|
After=network.target sound.target
|
|
Wants=network.target sound.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=bot
|
|
Group=bot
|
|
|
|
# Working directory where TeamSpeak client is installed
|
|
WorkingDirectory=/home/bot/TeamSpeak3-Client-linux_amd64
|
|
|
|
# Environment setup
|
|
Environment="XDG_RUNTIME_DIR=/tmp/.ts3bot-display"
|
|
Environment="HOME=/home/bot"
|
|
Environment="USER=bot"
|
|
Environment="DISPLAY=:1"
|
|
|
|
# Create runtime directory and start the service
|
|
ExecStartPre=/bin/mkdir -p /tmp/.ts3bot-display
|
|
ExecStartPre=/bin/chmod 700 /tmp/.ts3bot-display
|
|
|
|
# Main command - runs dbus, weston with RDP backend, and TeamSpeak
|
|
ExecStart=/bin/bash -c 'cd /home/bot/TeamSpeak3-Client-linux_amd64 && \
|
|
dbus-run-session -- \
|
|
weston \
|
|
--backend=rdp \
|
|
--xwayland \
|
|
--rdp-tls-cert=/home/bot/.config/EchoionTsBot.crt \
|
|
--rdp-tls-key=/home/bot/.config/EchoionTsBot.key \
|
|
-- ./ts3client_runscript.sh'
|
|
|
|
# Restart policy
|
|
Restart=always
|
|
RestartSec=10
|
|
StartLimitInterval=60
|
|
StartLimitBurst=3
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65536
|
|
LimitNPROC=4096
|
|
|
|
# Security settings
|
|
NoNewPrivileges=false
|
|
ProtectSystem=no
|
|
ProtectHome=no
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=teamspeak-echoion
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|