aboutsummaryrefslogtreecommitdiff
path: root/ejabberd-1.1.2/examples/transport-configs/init-scripts/ile
blob: a1e072f2c72cc8dd57cc3af123b4cd04c7f67071 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
#########################################################
#
#     ile -- script to start ILE.
#
#########################################################

DAEMON=/usr/local/sbin/ile.pl
NAME=ile.pl
CONF=/etc/jabber/ile.xml
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)
	echo "Not implemented yet. Starting in normal mode"
	$0 start
	;;
  start)
	test -f $DAEMON || exit 0
	echo "Starting $NAME."
	$DAEMON $CONF &
	;;
  stop)
	echo "Stopping $NAME."
	killall $NAME &
  	;;
  restart|reload)
	$0 stop
	sleep 3
	$0 start
	;;
  *)
	echo "Usage: $0 {debug|start|stop|status|restart}"
	exit 1
esac