summaryrefslogtreecommitdiff
path: root/chat/jabberd2/files/router.sh
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2004-03-28 19:44:05 +0000
committerxtraeme <xtraeme>2004-03-28 19:44:05 +0000
commitcce6f7e8e76d1ac50c11e27945c8851fdefda822 (patch)
tree818585795b4b142e34e7e7db2ee5a178aa9f0a8f /chat/jabberd2/files/router.sh
parent1699f1d8e82230d1c9cfc8f1dd7e92f223061eb9 (diff)
downloadpkgsrc-cce6f7e8e76d1ac50c11e27945c8851fdefda822.tar.gz
Initial import of jabberd2 (2.0s2) from pkgsrc-wip.
Jabber is an open XML protocol for real-time exchange of messages and presence notification between any two points on the Internet. The first application of Jabber technology is an asynchronous, extensible instant messaging platform, and an IM network that offers functionality similar to legacy IM systems such as AIM, ICQ, MSN, and Yahoo. This is a complete rewrite of the original jabberd.
Diffstat (limited to 'chat/jabberd2/files/router.sh')
-rwxr-xr-xchat/jabberd2/files/router.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/chat/jabberd2/files/router.sh b/chat/jabberd2/files/router.sh
new file mode 100755
index 00000000000..682b1c7f112
--- /dev/null
+++ b/chat/jabberd2/files/router.sh
@@ -0,0 +1,35 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: router.sh,v 1.1.1.1 2004/03/28 19:44:07 xtraeme Exp $
+#
+# PROVIDE: router
+# REQUIRE: DAEMON c2s
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="router"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+required_files="@PKG_SYSCONFDIR@/${name}.xml"
+extra_commands="reload"
+command_args="2>&1 > /dev/null &"
+router_user="@JABBERD_USER@"
+pidfile="@JABBERD_PIDDIR@/${name}.pid"
+stop_postcmd="remove_pidfile"
+
+remove_pidfile()
+{
+ if [ -f @JABBERD_PIDDIR@/${name}.pid ]; then
+ rm -f @JABBERD_PIDDIR@/${name}.pid
+ fi
+}
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${router_flags} ${command_args}
+fi