cdist-contrib/type/__netbox/files/netbox-rq.service
Matthias Stecher dd167f075d __netbox*: fix service restart order
Cause of corrupt databases if the services are restarted incorrectly,
the order and dependencies are adjusted. Now, the `netbox-rq` service
will be included in restarts of `netbox` and required for the WSGI
servers that it must running.

For these changes, the restart command of `__netbox` was adjusted. The
other ones where edited too, to use the same command.

All services now require redis and postgresql to be started before them
to prevent any start order issues.

If someone asked for what the RQ worker is required, see here:
 https://netbox.readthedocs.io/en/stable/additional-features/webhooks/#webhook-processing
2020-09-09 19:08:46 +02:00

24 lines
477 B
Desktop File

[Unit]
Description=NetBox Request Queue Worker
Documentation=https://netbox.readthedocs.io/en/stable/
PartOf=netbox.service
Wants=network.target
After=netbox.service
After=network.target
After=redis-server.service postgresql.service
[Service]
Type=simple
User=netbox
Group=netbox
WorkingDirectory=/opt/netbox
ExecStart=/opt/netbox/venv/bin/python3 /opt/netbox/netbox/manage.py rqworker
Restart=on-failure
RestartSec=30
PrivateTmp=true
[Install]
WantedBy=multi-user.target