service_files/systemd/tpdnsbot.service

18 lines
412 B
Desktop File

[Unit]
Description=telegram personal DNS bot
Wants=network.target
[Service]
Type=forking
WorkingDirectory=/home/tpdnsbot/tpdnsbot
User=tpdnsbot
Group=tpdnsbot
RemainAfterExit=yes
Environment="TELEGRAM_DNS_TOKEN=[REDACTED]"
ExecStart=/usr/bin/tmux new-session -s tpdnsbot -d /home/tpdnsbot/tpdnsbot/bot.sh start
ExecStop=/usr/bin/tmux kill-session -t tpdnsbot
KillMode=none
[Install]
WantedBy=multi-user.target