ejabberd-18.09-ejabberdctl.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
  2. Set SHELL since the generic jabber user used on Gentoo for jabber
  3. servers doesn't have a valid shell set by default and fix EXEC_CMD
  4. otherwise it fails with This account is currently not available again
  5. due to jabber not having a valid shell.
  6. Also, workaround the assumption that jabber's /root is a directory when
  7. instead it defaults to /dev/null on Gentoo.
  8. ---
  9. diff --git a/ejabberdctl.template b/ejabberdctl.template
  10. index 571b90b..71336c0 100755
  11. --- a/ejabberdctl.template
  12. +++ b/ejabberdctl.template
  13. @@ -82,6 +82,7 @@ fi
  14. ERL_LIBS={{libdir}}
  15. ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
  16. ERL_INETRC="$ETC_DIR"/inetrc
  17. +HOME=$SPOOL_DIR
  18. # define ejabberd parameters
  19. EJABBERD_OPTS="$EJABBERD_OPTS\
  20. @@ -105,12 +106,13 @@ export ERL_MAX_ETS_TABLES
  21. export CONTRIB_MODULES_PATH
  22. export CONTRIB_MODULES_CONF_DIR
  23. export ERL_LIBS
  24. +export HOME
  25. # run command either directly or via su $INSTALLUSER
  26. exec_cmd()
  27. {
  28. case $EXEC_CMD in
  29. - as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
  30. + as_install_user) su -p -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
  31. as_current_user) "$@" ;;
  32. esac
  33. }