aboutsummaryrefslogtreecommitdiff
path: root/net/ejabberd/files/ejabberd.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'net/ejabberd/files/ejabberd.sh.in')
-rw-r--r--net/ejabberd/files/ejabberd.sh.in87
1 files changed, 0 insertions, 87 deletions
diff --git a/net/ejabberd/files/ejabberd.sh.in b/net/ejabberd/files/ejabberd.sh.in
deleted file mode 100644
index d7e27e13b918..000000000000
--- a/net/ejabberd/files/ejabberd.sh.in
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /bin/sh
-# $FreeBSD$
-
-# PROVIDE: ejabberd
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-
-# Define these ejabberd_* variables in one of these files:
-# /etc/rc.conf
-# /etc/rc.conf.local
-# /etc/rc.conf.d/ejabberd
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-ejabberd_enable="NO"
-
-. %%RC_SUBR%%
-
-name=ejabberd
-rcvar=`set_rcvar`
-
-reload_cmd="ejabberd_reload"
-restart_cmd="ejabberd_reload"
-start_cmd="ejabberd_start"
-status_cmd="ejabberd_status"
-stop_cmd="ejabberd_stop"
-
-
-# Include ejabberd defaults if available
-[ -f %%PREFIX%%/etc/ejabberd/ejabberd.defaults ] && . %%PREFIX%%/etc/ejabberd/ejabberd.defaults
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/bin:%%PREFIX%%/sbin
-EJABBERD=%%PREFIX%%/bin/ejabberd
-EJABBERDCTL=%%PREFIX%%/bin/ejabberdctl
-EJABBERDUSER=ejabberd
-
-ejabberd_status()
-{
- su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` status >/dev/null"
-}
-
-ejabberd_start()
-{
- echo -n "Starting $name: "
- if ejabberd_status; then
- echo " already running."
- exit 1
- else
- su $EJABBERDUSER -c "$EJABBERD -noshell -detached"
- fi
- echo "$name."
-}
-
-ejabberd_stop()
-{
- echo -n "Stopping $name: "
- if su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` stop"; then
- cnt=0
- while ejabberd_status; do
- cnt=`expr $cnt + 1`
- if [ $cnt -gt 60 ]; then
- echo -n " failed "
- break
- fi
- sleep 1
- echo -n "."
- done
- else
- echo -n " failed "
- fi
- echo "$name."
-}
-
-ejabberd_reload()
-{
- echo -n "Restarting $name: "
- if ejabberd_status; then
- su $EJABBERDUSER -c "$EJABBERDCTL ejabberd@`hostname -s` restart"
- else
- ejabberd_start
- fi
- echo "$name."
-}
-
-load_rc_config $name
-run_rc_command "$1"