summaryrefslogtreecommitdiff
path: root/sysutils/py-supervisor/files/supervisord.in
blob: 3007e684e03825f158720ff5ca92e5621cf58061 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

# $FreeBSD$
#
# PROVIDE: supervisord
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf.local or /etc/rc.conf
# to enable supervisord:
#
# supervisord_enable="bool"	Set to NO by default.
#				Set it to YES to enable supervisord.
# supervisord_config (patch):	Set to %%PREFIX%%/etc/supervisord.conf by default.
# supervisord_user (username):	Set to root by default.
#

. /etc/rc.subr

name="supervisord"
rcvar=supervisord_enable

load_rc_config $name

: ${supervisord_enable="NO"}
: ${supervisord_config="%%PREFIX%%/etc/supervisord.conf"}
: ${supervisord_user="root"}

command="%%PREFIX%%/bin/${name}"
command_args="-u ${supervisord_user} -c ${supervisord_config}"
command_interpreter="%%PYTHON_CMD%%"
pidfile="%%PIDDIR%%/${name}.pid"

run_rc_command "$1"