Create netbox-rqworker.service

Supervisord seems to act up on Ubuntu 18.04.1, at least in a container. Convert that task to a proper systemd service.
This commit is contained in:
Michael Adams 2018-09-24 18:19:25 -07:00 committed by GitHub
parent 9440ac7640
commit aa96e3b3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
# Alternative to using supervisord for running the NetBox Redis Worker
# 1. Create in /etc/systemd/system/netbox-rqworker.service
# 2. systemctl enable netbox-rqworker && systemctl restart netbox-rqworker
[Unit]
Description=NetBox rqworker
[Service]
Type=simple
User=netbox
Group=netbox
Environment=LC_ALL=C.UTF-8 LANG=C.UTF-8
ExecStart=/usr/bin/python3 /opt/netbox/netbox/manage.py rqworker
WorkingDirectory=/opt/netbox/netbox
[Install]
WantedBy=redis-server.service