ports/net-mgmt/netbox/files/netbox_rq.sample.in
Kai Knoblich 1295cfab55 net-mgmt/netbox: Update to 2.9.9
* Add to the EXAMPLES options a few example configurations and a sample
  rc script to make use of the RQ background service.

Changelog:

Enhancements:
* Return server error messages as JSON when handling REST API requests
* Link to rack groups within rack list table
* Be more strict when capturing anticipated ImportError exceptions

Bug Fixes:
* Fix auto-population of region field when editing a device
* Fix config context rendering when multiple tags are assigned to an object
* Dry running scripts should not trigger webhooks
* Add missing template extension tags for plugins for VM interface view
* Fix CreatedUpdatedFilterTest when running in non-UTC timezone
* Fix filtering of sites by null region

https://github.com/netbox-community/netbox/releases/tag/v2.9.9
2020-11-20 08:57:10 +00:00

43 lines
922 B
Bash

#!/bin/sh
# This sample rc script starts the RQ worker background service which is
# required for Webhooks and various automation tasks.
#
# PROVIDE: netbox_rq
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf.local or /etc/rc.conf
# to enable netbox-rq:
#
# netbox_rq_enable (bool): Set to NO by default.
# Set it to YES to enable netbox_rq.
. /etc/rc.subr
name=netbox_rq
rcvar=netbox_rq_enable
load_rc_config $name
start_cmd="netbox_rq_start"
start_precmd="netbox_rq_precmd"
command="%%PYTHON_CMD%%"
command_args="%%DATADIR%%/manage.py rqworker"
pidfile=${netbox_rq_pidfile:-/var/run/${name}/${name}.pid}
netbox_rq_user=${netbox_rq_user:-www}
netbox_rq_precmd()
{
install -d -o ${netbox_rq_user} `dirname ${pidfile}`
}
netbox_rq_start()
{
echo "Starting netbox_rq."
/usr/sbin/daemon -cf -p ${pidfile} -u ${netbox_rq_user} ${command} ${command_args}
}
run_rc_command "$1"