#!/bin/sh
#
# PROVIDE: yasm
# REQUIRE: DAEMON
# REQUIRE: place
# KEYWORD: shutdown
#
# Define yasm_* variables in /etc/rc.conf.d/yasm
# Add the following line to this file to enable yasm:
# yasm_enable="YES"
#
# Documentation about system:
# http://wiki.yandex-team.ru/AndrejjUshakov/GolovanInstall
#

. /etc/rc.subr

name="yasm"
rcvar=`set_rcvar`

load_rc_config $name

: ${yasm_enable="NO"}
: ${yasm_user="yasm"}
: ${yasm_dir="/place/yasm"}

yasm_script="${yasm_dir}/apps/scripts/manage_all.sh"
yasm_cmd="/usr/bin/su -m ${yasm_user} -c \"${yasm_script}"

required_files="${yasm_script}"

start_cmd="$yasm_cmd start\""
stop_cmd="$yasm_cmd stop\""

run_rc_command "$1"
