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 44 45 46 47 48 49
|
Description: adjust ejabberdctl
The default ejabberdctl needs some changes to work correctly and to
avoid unnecessary problematic changes compared to older versions.
Author: Philipp Huebner <debalance@debian.org>
Forwarded: not-needed
Index: ejabberd/ejabberdctl.template
===================================================================
--- ejabberd.orig/ejabberdctl.template
+++ ejabberd/ejabberdctl.template
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# define default configuration
POLL=true
@@ -13,11 +13,10 @@ ERLANG_NODE=ejabberd@localhost
[ -z "$SCRIPT" ] && SCRIPT=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd -P)"
# shellcheck disable=SC2034
-ERTS_VSN="{{erts_vsn}}"
ERL="{{erl}}"
EPMD="{{epmd}}"
IEX="{{iexpath}}"
-INSTALLUSER="{{installuser}}"
+INSTALLUSER=ejabberd
# check the proper system user is used
case $(id -un) in
@@ -57,8 +56,8 @@ while [ $# -gt 0 ]; do
done
# define ejabberd variables if not already defined from the command line
-: "${CONFIG_DIR:="{{config_dir}}"}"
-: "${LOGS_DIR:="{{logs_dir}}"}"
+: "${CONFIG_DIR:="/etc/ejabberd"}"
+: "${LOGS_DIR:="/var/log/ejabberd"}"
: "${EJABBERD_CONFIG_PATH:="$CONFIG_DIR/ejabberd.yml"}"
: "${EJABBERDCTL_CONFIG_PATH:="$CONFIG_DIR/ejabberdctl.cfg"}"
# Allows passing extra Erlang command-line arguments in vm.args file
@@ -68,7 +67,7 @@ done
[ -n "$ERLANG_NODE_ARG" ] && ERLANG_NODE="$ERLANG_NODE_ARG"
[ "$ERLANG_NODE" = "${ERLANG_NODE%@*}" ] && ERLANG_NODE="$ERLANG_NODE@$(hostname -s)"
[ "$ERLANG_NODE" = "${ERLANG_NODE%.*}" ] && S="-s"
-: "${SPOOL_DIR:="{{spool_dir}}"}"
+: "${SPOOL_DIR:="/var/lib/ejabberd"}"
: "${EJABBERD_LOG_PATH:="$LOGS_DIR/ejabberd.log"}"
# define erl parameters
|