service_files/systemd/diskconnectbot.service

18 lines
463 B
Desktop File

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