Bot as a systemd service
I wrote a systemd Unit file to launch the bot at startup
[Unit]
Description=Mastobot Resolver
After=network-online.target
[Service]
User=john
Type=simple
WorkingDirectory=/home/john/dnsresolver/
ExecStart=/home/john/dnsresolver/bot.py
[Install]
WantedBy=multi-user.target
Works fine with the usual systemctl
commands (start, stop, reload), but nothing happens at startup. After a reboot, the service is dead
# systemctl status mastobot
● mastobot.service - Mastobot Resolver
Loaded: loaded (/etc/systemd/system/mastobot.service; enabled; vendor preset: enabled)
Active: inactive (dead)
The service isn't running, nothing is logged. I also tried by adding some dependancies (basic.target
and nss-lookup.target
) and switching to root without any differences.
My guess is either I missed something or there is a problem somewhere