Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F2239714
/usr/local/etc/rc.d/netbox
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Jun 11 2023, 11:12
2023-06-11 11:12:27 (UTC+0)
Size
850 B
Referenced Files
None
Subscribers
None
/usr/local/etc/rc.d/netbox
View Options
#!/bin/sh
# PROVIDE: netbox
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# 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"
}
pidfile
=
/var/run/netbox.pid
procname
=
"/srv/netbox/netbox-3.4.4/service.sh"
command
=
"/usr/sbin/daemon"
command_args
=
"-f -t
${
name
}
-p
${
pidfile
}
/usr/bin/env APP_PORT=
${
netbox_port
}
${
procname
}
"
netbox_precmd
()
{
touch
${
pidfile
}
chown
${
netbox_user
}
${
pidfile
}
}
start_precmd
=
${
name
}
_precmd
run_rc_command
"
$1
"
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1410808
Default Alt Text
/usr/local/etc/rc.d/netbox (850 B)
Attached To
Mode
P339 /usr/local/etc/rc.d/netbox
Attached
Detach File
Event Timeline
Log In to Comment