Control script relies on $HOME, so 'su -m' will not cut it. Changed to just

su in the rc.d script and adjusted the SMF manifest similarly.

Bump PKGREVISION. Fixes pkg/49052.
This commit is contained in:
fhajny 2014-07-31 10:31:51 +00:00
parent ef0136f2f8
commit 417f782520
3 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.42 2014/07/30 09:45:38 fhajny Exp $
# $NetBSD: Makefile,v 1.43 2014/07/31 10:31:51 fhajny Exp $
DISTNAME= ejabberd-14.07
PKGREVISION= 1
CATEGORIES= chat
MASTER_SITES= http://www.process-one.net/downloads/ejabberd/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tgz

View file

@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: ejabberd.sh,v 1.3 2013/10/11 13:32:25 fhajny Exp $
# $NetBSD: ejabberd.sh,v 1.4 2014/07/31 10:31:51 fhajny Exp $
# $FreeBSD: ejabberd.sh.in,v 1.1 2005/08/28 15:51:48 vsevolod Exp $
#
# PROVIDE: ejabberd
@ -29,7 +29,7 @@ EJABBERDCTL=@PREFIX@/sbin/ejabberdctl
ejabberd_status()
{
su -m $ejabberd_user -c "$EJABBERDCTL status >/dev/null"
su $ejabberd_user -c "$EJABBERDCTL status >/dev/null"
}
ejabberd_start()
@ -39,7 +39,7 @@ ejabberd_start()
echo " already running."
exit 1
else
su -m $ejabberd_user -c "$EJABBERDCTL start"
su $ejabberd_user -c "$EJABBERDCTL start"
fi
echo "$name."
}
@ -47,7 +47,7 @@ ejabberd_start()
ejabberd_stop()
{
echo -n "Stopping $name: "
if su -m $ejabberd_user -c "$EJABBERDCTL stop"; then
if su $ejabberd_user -c "$EJABBERDCTL stop"; then
cnt=0
while ejabberd_status; do
cnt=`expr $cnt + 1`
@ -68,7 +68,7 @@ ejabberd_reload()
{
echo -n "Restarting $name: "
if ejabberd_status; then
su -m $ejabberd_user -c "$EJABBERDCTL restart"
su $ejabberd_user -c "$EJABBERDCTL restart"
else
ejabberd_start
fi

View file

@ -23,6 +23,9 @@
</dependency>
<method_context working_directory='@EJABBERD_DB@'>
<method_credential user='@EJABBERD_USER@' group='@EJABBERD_GROUP@' />
<method_environment>
<envvar name='HOME' value='@EJABBERD_DB@' />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/ejabberdctl start' timeout_seconds='120' />
<exec_method name='stop' type='method' exec='@PREFIX@/sbin/ejabberdctl stop' timeout_seconds='60' />