From ca5033fec558c4cb077dff4d4a40a7c8b5263ef6 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 13 Nov 2013 13:07:25 +0100 Subject: [PATCH] x86_64 compatibility --- root/var/service/ejabberd/run | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/root/var/service/ejabberd/run b/root/var/service/ejabberd/run index 74d6399..d1c119f 100755 --- a/root/var/service/ejabberd/run +++ b/root/var/service/ejabberd/run @@ -27,19 +27,32 @@ SASL_LOG_PATH=/var/log/ejabberd/sasl.log export SASL_LOG_PATH EJABBERD_LOG_PATH=/var/log/ejabberd/ejabberd.log export EJABBERD_LOG_PATH -EJABBERD_SO_PATH=/usr/lib/ejabberd/priv/lib +if [ -d /usr/lib64/ejabberd/priv/lib ]; then + EJABBERD_SO_PATH=/usr/lib64/ejabberd/priv/lib +else + EJABBERD_SO_PATH=/usr/lib/ejabberd/priv/lib +fi export EJABBERD_SO_PATH EJABBERD_CONFIG_PATH=/etc/ejabberd/ejabberd.cfg export EJABBERD_CONFIG_PATH -EJABBERD_MSGS_PATH=/usr/lib/ejabberd/priv/msgs +if [ -d /usr/lib64/ejabberd/priv/msgs ]; then + EJABBERD_MSGS_PATH=/usr/lib64/ejabberd/priv/msgs +else + EJABBERD_MSGS_PATH=/usr/lib/ejabberd/priv/msgs +fi export EJABBERD_MSGS_PATH EJABBERD_DB=/var/lib/ejabberd/spool export EJABBERD_DB HOME=/var/lib/ejabberd export HOME +if [ -d /usr/lib64/ejabberd/ebin ]; then + EBIN=/usr/lib64/ejabberd/ebin +else + EBIN=/usr/lib/ejabberd/ebin +fi exec /usr/local/bin/setuidgid ejabberd \ - erl -pa /usr/lib/ejabberd/ebin \ + erl -pa $EBIN \ -noinput \ -smp auto +K false +P 250000 \ -sname ejabberd \ @@ -49,4 +62,4 @@ exec /usr/local/bin/setuidgid ejabberd \ -ejabberd config \"$EJABBERD_CONFIG_PATH\" \ log_path \"$EJABBERD_LOG_PATH\" \ -sasl sasl_error_logger \{file,\"$SASL_LOG_PATH\"\} - +