Initial work on netbox role
Change-Id: I8e51dc7d5f21d3c83b3d8ab3955467c6069c7c74
diff --git a/templates/netbox-rq.service.j2 b/templates/netbox-rq.service.j2
new file mode 100644
index 0000000..1973d61
--- /dev/null
+++ b/templates/netbox-rq.service.j2
@@ -0,0 +1,25 @@
+{#
+SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+SPDX-License-Identifier: Apache-2.0
+#}
+[Unit]
+Description=NetBox Request Queue Worker
+Documentation=https://netbox.readthedocs.io/en/stable/
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+
+User={{ netbox_username }}
+Group={{ netbox_groupname }}
+WorkingDirectory={{ netbox_working_dir }}
+
+ExecStart={{ netbox_working_dir }}/venv/bin/python3 {{ netbox_working_dir }}/netbox/manage.py rqworker
+
+Restart=on-failure
+RestartSec=30
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target