17 |
|
|
18 |
. /etc/rc.d/init.d/functions |
. /etc/rc.d/init.d/functions |
19 |
|
|
20 |
|
if [ -r /etc/sysconfig/ejabberd ]; then |
21 |
|
. /etc/sysconfig/ejabberd |
22 |
|
fi |
23 |
|
|
24 |
|
if [ ! "$CONFIG_FILE" ]; then |
25 |
|
CONFIG_FILE=/etc/ejabberd/ejabberd.cfg |
26 |
|
fi |
27 |
|
|
28 |
node=`hostname -s` |
node=`hostname -s` |
29 |
|
|
30 |
start() { |
start() { |
31 |
echo -n $"Starting ejabberd: " |
echo -n $"Starting ejabberd: " |
32 |
|
if [ "$ULIMIT_MAX_FILES" ]; then |
33 |
|
ulimit -n $ULIMIT_MAX_FILES |
34 |
|
fi |
35 |
daemon --user=ejabberd --check=ejabberd \ |
daemon --user=ejabberd --check=ejabberd \ |
36 |
"erl" "-pa @libdir@/ejabberd/ebin \ |
"erl" "-pa @libdir@/ejabberd/ebin \ |
37 |
-sname ejabberd \ |
-sname ejabberd \ |
38 |
-s ejabberd \ |
-s ejabberd \ |
39 |
-ejabberd config \\\"/etc/ejabberd/ejabberd.cfg\\\" \ |
-ejabberd config \\\"$CONFIG_FILE\\\" \ |
40 |
log_path \\\"/var/log/ejabberd/ejabberd.log\\\" \ |
log_path \\\"/var/log/ejabberd/ejabberd.log\\\" \ |
41 |
-sasl sasl_error_logger \\{file,\\\"/var/log/ejabberd/sasl.log\\\"\\} \ |
-sasl sasl_error_logger \\{file,\\\"/var/log/ejabberd/sasl.log\\\"\\} \ |
42 |
-mnesia dir \\\"/var/lib/ejabberd/spool\\\" \ |
-mnesia dir \\\"/var/lib/ejabberd/spool\\\" \ |