Assuming no errors are logged (check "systemctl status mybot.service", the systemd journal with journalctl, and any logs from your code), it's possible that the bot framework you are using is automatically daemonizing itself (i.e. forking a daemon instance, then exiting the parent process). That's a fairly common old-school behaviour for Linux services, kinda pre-systemd. If that's the case, you can either tell it not to daemonize (i.e. run in foreground), or systemd can deal with that with something like this in your service file:I actually just did nearly exactly this though with venv. However I am running into an issue where the service finishes executing after 1/10th of a second under a SUCESS status.
Code:
[Service]Type=forkingPIDFile=/run/discord-bot.pidExecStart=/usr/local/lib/discord-bot
Statistics: Posted by Murph9000 — Fri Aug 30, 2024 11:45 am