aboutsummaryrefslogtreecommitdiff
path: root/examples/transport-configs/init-scripts/yahoo-transport-2
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2005-04-01 22:43:47 +0000
committerAlexey Shchepin <alexey@process-one.net>2005-04-01 22:43:47 +0000
commitbaa1cfada594ce00a952d79a053761dcb5f18a4e (patch)
treed1f8e1959de3baeecf83284d4e9ca1a1cac7209b /examples/transport-configs/init-scripts/yahoo-transport-2
parent* examples/transport-configs/: Updated (thanks to Sander Devrieze) (diff)
* examples/transport-configs/: Updated (thanks to Sander Devrieze)
SVN Revision: 302
Diffstat (limited to '')
-rwxr-xr-xexamples/transport-configs/init-scripts/yahoo-transport-245
1 files changed, 45 insertions, 0 deletions
diff --git a/examples/transport-configs/init-scripts/yahoo-transport-2 b/examples/transport-configs/init-scripts/yahoo-transport-2
new file mode 100755
index 000000000..fde78a913
--- /dev/null
+++ b/examples/transport-configs/init-scripts/yahoo-transport-2
@@ -0,0 +1,45 @@
+#!/bin/sh
+##############################################################
+#
+# yahoo-transport-2 -- script to start Yahoo-transport-2.
+#
+#############################################################
+
+DAEMON=/usr/local/sbin/jabberd-yahoo-transport-2
+CONF=/etc/jabber/yahoo-transport-2.xml
+NAME=jabberd-yahoo-transport-2
+HOME=/etc/jabber/
+USER=ejabberd
+
+#############################################################
+
+if [ "`/usr/bin/whoami`" != "$USER" ]; then
+
+ echo "You need to be" $USER "user to run this script."
+ exit 1
+fi
+
+case "$1" in
+ debug)
+ test -f $DAEMON -a -f $CONF || exit 0
+ echo "Starting $NAME in debugging mode."
+ $DAEMON -D -H $HOME -c $CONF &
+ ;;
+ start)
+ test -f $DAEMON -a -f $CONF || exit 0
+ echo "Starting $NAME."
+ $DAEMON -H $HOME -c $CONF &
+ ;;
+ stop)
+ echo "Stopping $NAME."
+ killall $NAME &
+ ;;
+ restart|reload)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {debug|start|stop|restart}"
+ exit 1
+esac