pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/chat/prosody chat/prosody: always create the directory...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0161d3f71185
branches:  trunk
changeset: 382304:0161d3f71185
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Mon Jul 25 04:47:06 2022 +0000

description:
chat/prosody: always create the directory for the PID file

The RC script for prosody now always creates the corresponding
sub-directory for prosody's PID file. This is inspired by the RC script
for mdnsd in NetBSD, and for dbus in pkgsrc; thanks spz@ for the
suggestion!

Bumps PKGREVISION.

Tested on NetBSD/amd64.

XXX pull-up to pkgsrc-2022Q2 (completes request 6649)

diffstat:

 chat/prosody/Makefile         |   6 ++++--
 chat/prosody/files/prosody.sh |  13 +++++++++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diffs (53 lines):

diff -r 03fca7a0fafc -r 0161d3f71185 chat/prosody/Makefile
--- a/chat/prosody/Makefile     Mon Jul 25 02:01:45 2022 +0000
+++ b/chat/prosody/Makefile     Mon Jul 25 04:47:06 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.39 2022/07/07 02:31:45 khorben Exp $
+# $NetBSD: Makefile,v 1.40 2022/07/25 04:47:06 khorben Exp $
 
 DISTNAME=              prosody-0.12.0
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            chat
 MASTER_SITES=          https://prosody.im/downloads/source/
 
@@ -71,6 +71,8 @@
 
 RCD_SCRIPTS=           prosody
 FILES_SUBST+=          PROSODY_RUN=${PROSODY_RUN}
+FILES_SUBST+=          PROSODY_USER=${PROSODY_USER}
+FILES_SUBST+=          PROSODY_GROUP=${PROSODY_GROUP}
 
 TEST_TARGET=           test
 
diff -r 03fca7a0fafc -r 0161d3f71185 chat/prosody/files/prosody.sh
--- a/chat/prosody/files/prosody.sh     Mon Jul 25 02:01:45 2022 +0000
+++ b/chat/prosody/files/prosody.sh     Mon Jul 25 04:47:06 2022 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: prosody.sh,v 1.4 2022/07/07 02:31:46 khorben Exp $
+# $NetBSD: prosody.sh,v 1.5 2022/07/25 04:47:06 khorben Exp $
 #
 # PROVIDE: prosody
 # REQUIRE: DAEMON
@@ -14,9 +14,18 @@
 ctl_command="@PREFIX@/bin/${name}ctl"
 required_files="@PKG_SYSCONFDIR@/${name}.cfg.lua"
 pidfile="@PROSODY_RUN@/${name}.pid"
-#start_precmd="ulimit -n 2048"
+start_precmd="prosody_precmd"
 extra_commands="reload status"
 
+prosody_precmd()
+{
+    if [ ! -d @PROSODY_RUN@ ]; then
+        @MKDIR@ -m 0755 @PROSODY_RUN@
+    fi
+    @CHOWN@ @PROSODY_USER@:@PROSODY_GROUP@ @PROSODY_RUN@
+    #ulimit -n 2048
+}
+
 start_cmd="${ctl_command} start"
 stop_cmd="${ctl_command} stop"
 reload_cmd="${ctl_command} reload"



Home | Main Index | Thread Index | Old Index