freebsd-ports/net-im/prosody/files/prosody.in
David Thiel 2f2a66103c The rc script now features not just starting and stopping, but restarting.
Submitted by:	Doug Barton, dougb@
Feature safe:	yes
2010-06-13 00:47:57 +00:00

38 lines
684 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: prosody
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# prosody_enable (bool): Set to NO by default.
# Set it to YES to enable Prosody
. /etc/rc.subr
name="prosody"
rcvar=`set_rcvar`
pidfile="%%PREFIX%%/var/lib/prosody/prosody.pid"
command="%%PREFIX%%/bin/prosodyctl"
load_rc_config $name
prosody=${prosody_enable-"NO"}
extra_commands="status"
start_cmd="prosody_cmd start"
stop_cmd="prosody_cmd stop"
restart_cmd="$stop_cmd; $start_cmd"
status_cmd="prosody_cmd status"
prosody_cmd()
{
%%PREFIX%%/bin/prosodyctl $1
}
run_rc_command "$1"