#!/sbin/runscript

# This program is Copyright (c) SolarWinds Worldwide, LLC. All rights reserved.

command="/usr/local/bin/vc-agent-007"
pidfile="/var/run/vc-agent-007.pid"
rc_cgroup_cleanup="yes"
command_args=""
if [ "$RC_CMD" = "start" -a ! "$RC_PID" = "" ]; then
	# Booting.  Allow for up to 10 retries for network to be fully functional, with 10 seconds between them.
	command_args="-startup-network-retries=10 -startup-network-retry-interval=10s"
fi
set_conf_file=0
if [ "${set_conf_file}" != "0" ]; then
	command_args="${command_args} -config-file=/etc/vividcortex/global.conf"
fi

# Set HOME in case it isn't or points to a user dir (sudo)
HOME=~root
test -d "${HOME}" || HOME=/root
test -d "${HOME}" || HOME=
export HOME

depend() {
	need localmount
	use logger net dns
	after bootmisc clock
	provide vividcortex
}
