Page MenuHomeDevCentral

netbox
No OneTemporary

#!/bin/sh
# PROVIDE: netbox
# REQUIRE: DAEMON
# KEYWORD: shutdown
# -------------------------------------------------------------
# NetBox
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/netbox/server/files/rc/netbox
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# netbox_enable (bool): Set it to YES to enable netbox.
# Default is "NO".
# netbox_user (user): Set user to run netbox.
# Default is "netbox".
# netbox_port (int): Set port to run netbox.
# Default is "17000".
. /etc/rc.subr
name=netbox
rcvar=netbox_enable
load_rc_config $name
: ${netbox_enable:="NO"}
: ${netbox_user:="netbox"}
: ${netbox_port:="17000"}
procname=/srv/netbox/venv/bin/python3.11
pidfile=/var/run/netbox/netbox.pid
netbox_service="/srv/netbox/service.sh"
command="/usr/sbin/daemon"
command_args="-f -t ${name} /usr/bin/env APP_PORT=${netbox_port} PID_FILE=${pidfile} ${netbox_service}"
netbox_precmd()
{
mkdir -p /var/run/netbox
chown ${netbox_user} /var/run/netbox
}
start_precmd=${name}_precmd
run_rc_command "$1"

File Metadata

Mime Type
text/x-shellscript
Expires
Sun, May 17, 19:19 (23 h, 38 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3723278
Default Alt Text
netbox (1 KB)

Event Timeline