Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 6D61F84D4A for ; Fri, 6 Oct 2023 14:21:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id kDZ4qFOOQ3FT for ; Fri, 6 Oct 2023 14:21:35 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 6CAAD84D15 for ; Fri, 6 Oct 2023 14:21:35 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 606D9FBDB; Fri, 6 Oct 2023 14:21:35 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1696602095212730" MIME-Version: 1.0 Date: Fri, 6 Oct 2023 14:21:35 +0000 From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= Subject: CVS commit: pkgsrc/net/mosquitto/files To: pkgsrc-changes@NetBSD.org Approved: commit_and_comment Reply-To: triaxx@netbsd.org X-Mailer: log_accum Message-Id: <20231006142135.606D9FBDB@cvs.NetBSD.org> This is a multi-part message in MIME format. --_----------=_1696602095212730 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: triaxx Date: Fri Oct 6 14:21:35 UTC 2023 Modified Files: pkgsrc/net/mosquitto/files: mosquitto.sh Log Message: mosquitto: Patch rc.d script for setting user from rc.conf To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/mosquitto/files/mosquitto.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1696602095212730 Content-Disposition: inline Content-Length: 1170 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/net/mosquitto/files/mosquitto.sh diff -u pkgsrc/net/mosquitto/files/mosquitto.sh:1.6 pkgsrc/net/mosquitto/files/mosquitto.sh:1.7 --- pkgsrc/net/mosquitto/files/mosquitto.sh:1.6 Fri Oct 6 07:50:54 2023 +++ pkgsrc/net/mosquitto/files/mosquitto.sh Fri Oct 6 14:21:35 2023 @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: mosquitto.sh,v 1.6 2023/10/06 07:50:54 triaxx Exp $ +# $NetBSD: mosquitto.sh,v 1.7 2023/10/06 14:21:35 triaxx Exp $ # # PROVIDE: mosquitto # REQUIRE: DAEMON @@ -9,12 +9,16 @@ $_rc_subr_loaded . @SYSCONFBASE@/rc.subr name="mosquitto" rcvar=$name + +load_rc_config $name + +: ${mosquitto_user:=@MOSQUITTO_USER@} + command="@PREFIX@/sbin/${name}" +command_args="-d -c @PKG_SYSCONFDIR@/${name}.conf" + piddir="@VARBASE@/run/${name}" pidfile="${piddir}/${name}.pid" -config="@PKG_SYSCONFDIR@/${name}.conf" - -command_args="-d -c $config" start_precmd="mosquitto_precmd" test_cmd="mosquitto_test" @@ -23,8 +27,7 @@ extra_commands="" mosquitto_precmd() { mkdir -p ${piddir} - chown @MOSQUITTO_USER@ ${piddir} + chown ${mosquitto_user} ${piddir} } -load_rc_config $name run_rc_command "$1" --_----------=_1696602095212730--