25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Prepare ejabberd.init when installing ejabberd.

SVN Revision: 2524
This commit is contained in:
Badlop 2009-08-24 19:59:30 +00:00
parent d9a8c89b5a
commit 19355e947e
2 changed files with 11 additions and 4 deletions

View File

@ -21,11 +21,13 @@ ifeq ($(INSTALLUSER),)
G_USER= G_USER=
CHOWN_COMMAND=echo CHOWN_COMMAND=echo
CHOWN_OUTPUT=/dev/null CHOWN_OUTPUT=/dev/null
INIT_USER=root
else else
O_USER=-o $(INSTALLUSER) O_USER=-o $(INSTALLUSER)
G_USER=-g $(INSTALLUSER) G_USER=-g $(INSTALLUSER)
CHOWN_COMMAND=chown CHOWN_COMMAND=chown
CHOWN_OUTPUT=&1 CHOWN_OUTPUT=&1
INIT_USER=$(INSTALLUSER)
endif endif
EFLAGS += -pa . EFLAGS += -pa .
@ -186,6 +188,11 @@ install: all
[ -d $(SBINDIR) ] || install -d -m 755 $(SBINDIR) [ -d $(SBINDIR) ] || install -d -m 755 $(SBINDIR)
install -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl install -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
# #
# Init script
sed -e "s*@ctlscriptpath@*$(SBINDIR)*" \
-e "s*@installuser@*$(INIT_USER)*" ejabberd.init.template \
> ejabberd.init
#
# Binary Erlang files # Binary Erlang files
install -d $(BEAMDIR) install -d $(BEAMDIR)
install -m 644 *.app $(BEAMDIR) install -m 644 *.app $(BEAMDIR)

View File

@ -2,11 +2,11 @@
set -o errexit set -o errexit
set -o nounset set -o nounset
DIR=@@INSTALLDIR@@ DIR=@ctlscriptpath@
CTL="$DIR"/bin/ejabberdctl CTL="$DIR"/ejabberdctl
USER=ejabberd USER=@installuser@
test -d "$DIR" || { test -x "$CTL" || {
echo "ERROR: ejabberd not found: $DIR" echo "ERROR: ejabberd not found: $DIR"
exit 1 exit 1
} }