for this to work we need to tell it where to find the distro rebar - update to 24.02 https://www.process-one.net/blog/ejabberd-24-02/ https://github.com/processone/ejabberd/releases/tag/24.02 OBS-URL: https://build.opensuse.org/package/show/devel:languages:erlang/ejabberd?expand=0&rev=155
30 lines
879 B
Diff
30 lines
879 B
Diff
Index: ejabberd-24.02/ejabberdctl.template
|
|
===================================================================
|
|
--- ejabberd-24.02.orig/ejabberdctl.template
|
|
+++ ejabberd-24.02/ejabberdctl.template
|
|
@@ -19,6 +19,24 @@ EPMD="{{epmd}}"
|
|
IEX="{{iexpath}}"
|
|
INSTALLUSER="{{installuser}}"
|
|
|
|
+EJABBERD_UID="$(id -u $INSTALLUSER 2> /dev/null)"
|
|
+CURRENT_UID="$(id -u 2> /dev/null)"
|
|
+
|
|
+if [ -z "$EJABBERD_UID" ] ; then
|
|
+ echo "Can not find ejabberd userid! Exiting ..." >&2
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+if [ -z "$CURRENT_UID" ] ; then
|
|
+ echo "Can not find userid for your current user! Exiting ..." >&2
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
+if [ "$EJABBERD_UID" != "$CURRENT_UID" ] ; then
|
|
+ echo -e "Please run the command as user $INSTALLUSER.\n\nYou can use:\n\nsudo -u $INSTALLUSER ejabberdctl ....\n\nExiting ..." >&2
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
# check the proper system user is used
|
|
case $(id -un) in
|
|
"$INSTALLUSER")
|