freebsd-ports/sysutils/py-salt/files/salt_minion.in
Jason Helfman fe74b8ce10 - shift origins for consistentcy with other Python ports
Submitted by:	jgh@
Approved by:	maintainer, christer.edwards@gmail.com
2013-01-27 21:02:19 +00:00

35 lines
653 B
Bash

#!/bin/sh
# $FreeBSD$
#
# Salt Minion startup script
#
# PROVIDE: salt_minion
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following to /etc/rc.conf[.local] to enable this service
#
# salt_minion_enable="YES"
#
. /etc/rc.subr
name="salt_minion"
rcvar=salt_minion_enable
load_rc_config ${name}
: ${salt_minion_enable:="NO"}
: ${salt_minion_paths="$PATH"}
: ${salt_minion_eggcache="/tmp"}
command="%%PREFIX%%/bin/salt-minion"
command_interpreter="%%PYTHON_CMD%%"
required_files="%%PREFIX%%/etc/salt"
command_args="-c ${required_files} -d"
export PATH="${salt_minion_paths}"
export PYTHON_EGG_CACHE="${salt_minion_eggcache}"
run_rc_command "$1"