aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/netbox/netbox.initd
blob: 6b135dbb080aaa788f8cc2741c11574068bf4145 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/sbin/openrc-run

_port=8080
_bind=0.0.0.0
_basedir=/usr/share/webapps/netbox
_logfile="/var/log/${RC_SVCNAME}"
pidfile="/run/netbox/${RC_SVCNAME}.pid"
command=/usr/bin/gunicorn
command_args="--daemon \
	--pid $pidfile \
	--log-file $_logfile \
	--log-level info \
	-c $_basedir/gunicorn_config.py netbox.wsgi"
command_user="netbox"
command_group="netbox"

start_pre() {
	checkpath --directory /run/${RC_SVCNAME} /var/log/${RC_SVCNAME} \
		--owner $command_user:$command_group --mode 755
}