pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

anope: fix PKGLOCALEDIR in rc.d script. add support command.



Module Name:	pkgsrc-wip
Committed By:	nia <nia%NetBSD.org@localhost>
Pushed By:	nee
Date:		Tue Feb 5 18:08:19 2019 +0000
Changeset:	69cedf19879c35c5c21d8fefd1055b4df5102a8d

Modified Files:
	anope/Makefile
	anope/files/anope.sh

Log Message:
anope: fix PKGLOCALEDIR in rc.d script. add support command.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=69cedf19879c35c5c21d8fefd1055b4df5102a8d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 anope/Makefile       |  1 +
 anope/files/anope.sh | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diffs:
diff --git a/anope/Makefile b/anope/Makefile
index 5f9b5e6134..6e319103db 100644
--- a/anope/Makefile
+++ b/anope/Makefile
@@ -39,6 +39,7 @@ OWN_DIRS_PERMS+=	${PREFIX}/anope/logs ${ANOPE_USER} ${ANOPE_GROUP} 0755
 
 FILES_SUBST+=		ANOPE_GROUP=${ANOPE_GROUP:Q}
 FILES_SUBST+=		ANOPE_USER=${ANOPE_USER:Q}
+FILES_SUBST+=		PKGLOCALEDIR=${PKGLOCALEDIR}
 
 SUBST_CLASSES+=		conf
 SUBST_STAGE.conf=	pre-configure
diff --git a/anope/files/anope.sh b/anope/files/anope.sh
index 14d3619b6d..2d0ad7c519 100644
--- a/anope/files/anope.sh
+++ b/anope/files/anope.sh
@@ -12,7 +12,7 @@ rcvar=${name}
 command="@PREFIX@/bin/anope"
 command_args="--confdir=@PKG_SYSCONFDIR@/anope"
 command_args="${command_args} --dbdir=@PREFIX@/anope/data"
-command_args="${command_args} --localedir=@PREFIX/@PKGLOCALEDIR@/locale"
+command_args="${command_args} --localedir=@PREFIX@/@PKGLOCALEDIR@/locale"
 command_args="${command_args} --logdir=@PREFIX@/anope/logs"
 command_args="${command_args} --modulesdir=@PREFIX@/lib/anope"
 required_files="@PKG_SYSCONFDIR@/anope/services.conf"
@@ -21,5 +21,17 @@ pidfile="@PREFIX@/anope/${name}.pid"
 anope_user="@ANOPE_USER@"
 anope_group="@ANOPE_GROUP@"
 
+extra_commands="support"
+support_cmd="anope_support"
+
+anope_support()
+{
+	if [ ! -f ${required_files} ]; then
+		warn "${required_files} does not exist."
+		return 1;
+	fi
+	su -m ${anope_user}:${anope_group} -c "${command} ${command_args} --support"
+}
+
 load_rc_config $name
 run_rc_command "$1"


Home | Main Index | Thread Index | Old Index