ports/sysutils/py-supervisor/files/supervisord.in
William Grzybowski 13dc2491db sysutils/py-supervisor: allow user and config location for rc config
- Allow user and config location for rc config [1]
- Allow staging
- Switch from easy_install to install
- Use python auto plist

PR:		ports/183788 [1]
Submitted by:	Sevan Janiyan <venture37 geeklan.co.uk>
Approved by:	maintainer
2013-12-26 11:49:42 +00:00

34 lines
796 B
Bash

#!/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"