#!/bin/sh # # $FreeBSD: head/net-mgmt/sx/files/sxserver.in 360051 2014-07-01 16:24:15Z vg $ # # PROVIDE: sxserver # REQUIRE: LOGIN # BEFORE: securelevel # KEYWORD: shutdown # Add the following lines to /etc/rc.conf to enable `sxserver': # # sxserver_enable="YES" # . /etc/rc.subr name="sxserver" rcvar=sxserver_enable command="%%PREFIX%%/sbin/sxserver" start_precmd="${name}_prestart" stop_cmd="${name}_stop" restart_cmd="${name}_restart" status_cmd="${name}_status" load_rc_config "$name" : ${sxserver_enable="NO"} sxserver_prestart() { command_args="start" } sxserver_stop() { eval "${command} stop" } sxserver_restart() { eval "${command} restart" } sxserver_status() { eval "${command} status" } run_rc_command $*