Skip to content

systemd startup script; consider a fork() model #183

Description

@utdrmac

I've noticed that this script doesn't fork() and return like most daemon processes. A) would be to request this behavior and send logs to journal/syslog or /var/log/file.log B) until then, if anyone wants, I made this systemd startup script.

Obviously, edit the paths so they make sense to you. I tested this with a kill -9 and 10 seconds later, systemctl restart it. Sweet!

root@gasgiant:/usr/src/poloniexlendingbot# cat /lib/systemd/system/lendingbot.service
[Unit]
Description=LendingBot service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/python /usr/src/poloniexlendingbot/lendingbot.py
WorkingDirectory=/usr/src/poloniexlendingbot
RestartSec=10
Restart=on-failure

[Install]
WantedBy=multi-user.target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions