Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:licehunter:staging
ejabberd
ejabberd-16.06_dont_run_as_root.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ejabberd-16.06_dont_run_as_root.patch of Package ejabberd
Index: ejabberd-22.10/ejabberdctl.template =================================================================== --- ejabberd-22.10.orig/ejabberdctl.template +++ ejabberd-22.10/ejabberdctl.template @@ -19,6 +19,24 @@ IEX="{{bindir}}/iex" EPMD="{{epmd}}" 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")
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor