aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authorlx <lx@FreeBSD.org>2010-06-13 08:47:57 +0800
committerlx <lx@FreeBSD.org>2010-06-13 08:47:57 +0800
commita41c7a149354d44ed5b817a3fe0396ddd8eeb403 (patch)
tree0ffe919c67f3ea7fa5684420f8392e8c6e73c6dd /net-im
parent4c203a2c5bbd92c364fb83bfaa5906519ceb5ed3 (diff)
downloadfreebsd-ports-graphics-a41c7a149354d44ed5b817a3fe0396ddd8eeb403.tar.gz
freebsd-ports-graphics-a41c7a149354d44ed5b817a3fe0396ddd8eeb403.tar.zst
freebsd-ports-graphics-a41c7a149354d44ed5b817a3fe0396ddd8eeb403.zip
The rc script now features not just starting and stopping, but restarting.
Submitted by: Doug Barton, dougb@ Feature safe: yes
Diffstat (limited to 'net-im')
-rw-r--r--net-im/prosody/Makefile2
-rw-r--r--net-im/prosody/files/prosody.in21
2 files changed, 12 insertions, 11 deletions
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile
index e5c77bec772..1cdcaa27671 100644
--- a/net-im/prosody/Makefile
+++ b/net-im/prosody/Makefile
@@ -7,7 +7,7 @@
PORTNAME= prosody
PORTVERSION= 0.5.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-im
MASTER_SITES= http://prosody.im/downloads/source/
diff --git a/net-im/prosody/files/prosody.in b/net-im/prosody/files/prosody.in
index e3502447b4c..3c14232335c 100644
--- a/net-im/prosody/files/prosody.in
+++ b/net-im/prosody/files/prosody.in
@@ -1,13 +1,16 @@
#!/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
@@ -19,19 +22,17 @@ command="%%PREFIX%%/bin/prosodyctl"
load_rc_config $name
prosody=${prosody_enable-"NO"}
-command_args="$1"
-status_cmd=prosody_status_cmd
-stop_cmd=prosody_stop_cmd
+extra_commands="status"
-prosody_stop_cmd()
-{
- /usr/local/bin/prosodyctl stop
-}
+start_cmd="prosody_cmd start"
+stop_cmd="prosody_cmd stop"
+restart_cmd="$stop_cmd; $start_cmd"
+status_cmd="prosody_cmd status"
-prosody_status_cmd()
+prosody_cmd()
{
- %%PREFIX%%/bin/prosodyctl status
+ %%PREFIX%%/bin/prosodyctl $1
}
run_rc_command "$1"