2021-06-25 12:40:26 +02:00
|
|
|
echo -n "===> Preparing dev configuration files: "
|
|
|
|
|
2021-07-15 21:30:36 +02:00
|
|
|
PWD_DIR=`pwd`
|
|
|
|
REL_DIR=$PWD_DIR/_build/dev/rel/ejabberd/
|
|
|
|
CON_DIR=$REL_DIR/etc/ejabberd/
|
|
|
|
BIN_DIR=$REL_DIR/bin/
|
2021-06-25 12:40:26 +02:00
|
|
|
CTLPATH=$BIN_DIR/ejabberdctl
|
|
|
|
|
2021-07-15 21:30:36 +02:00
|
|
|
[ -z "$REL_DIR_TEMP" ] && REL_DIR_TEMP=$REL_DIR
|
|
|
|
CON_DIR_TEMP=$REL_DIR_TEMP/etc/ejabberd/
|
|
|
|
BIN_DIR_TEMP=$REL_DIR_TEMP/bin/
|
|
|
|
|
|
|
|
[ ! -e "ejabberdctl" ] \
|
2021-06-25 12:40:26 +02:00
|
|
|
&& echo -n "ejabberdctl " \
|
2021-06-25 13:08:06 +02:00
|
|
|
&& ln -s $CTLPATH ejabberdctl
|
|
|
|
|
2021-07-15 21:30:36 +02:00
|
|
|
# (cd $BIN_DIR_TEMP && sed -i "s|^SCRIPT_DIR=.*|SCRIPT_DIR=$REL_DIR|g" ejabberdctl)
|
2021-06-25 12:40:26 +02:00
|
|
|
|
2021-07-15 21:30:36 +02:00
|
|
|
cd $CON_DIR_TEMP
|
2021-06-25 12:40:26 +02:00
|
|
|
|
2021-07-15 21:30:36 +02:00
|
|
|
sed -i "s|# certfiles:|certfiles:\n - $CON_DIR/cert.pem|g" ejabberd.yml.example
|
|
|
|
sed -i "s|certfiles:|ca_file: $CON_DIR/ca.pem\ncertfiles:|g" ejabberd.yml.example
|
|
|
|
sed -i 's|^acl:$|acl:\n admin: [user: admin]|g' ejabberd.yml.example
|
|
|
|
[ ! -f "$CON_DIR/ejabberd.yml" ] \
|
2021-06-25 12:40:26 +02:00
|
|
|
&& echo -n "ejabberd.yml " \
|
2021-07-15 21:30:36 +02:00
|
|
|
&& mv ejabberd.yml.example ejabberd.yml
|
2021-06-25 12:40:26 +02:00
|
|
|
|
2021-07-15 21:30:36 +02:00
|
|
|
sed -i "s|#' POLL|EJABBERD_BYPASS_WARNINGS=true\n\n#' POLL|g" ejabberdctl.cfg.example
|
|
|
|
[ ! -f "$CON_DIR/ejabberdctl.cfg" ] \
|
2021-06-25 12:40:26 +02:00
|
|
|
&& echo -n "ejabberdctl.cfg " \
|
2021-07-15 21:30:36 +02:00
|
|
|
&& mv ejabberdctl.cfg.example ejabberdctl.cfg
|
2021-06-25 12:40:26 +02:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "===> Now you can start this ejabberd dev with: ./ejabberdctl live"
|