2f2a66103c
Submitted by: Doug Barton, dougb@ Feature safe: yes
38 lines
684 B
Bash
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"
|