pkgsrc-WIP-changes archive

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

mariadb104-server: Make sure the pidfile is in a directory owned by mariadb



Module Name:	pkgsrc-wip
Committed By:	nia <nia%netbsd.org@localhost>
Pushed By:	nee
Date:		Wed Apr 28 14:42:43 2021 +0200
Changeset:	4acc65bf69b224b7f56d4010feb30ee3d6a518fd

Modified Files:
	mariadb104-server/Makefile
	mariadb104-server/files/mariadb.sh
	mariadb104-server/files/smf/mariadb.sh

Log Message:
mariadb104-server: Make sure the pidfile is in a directory owned by mariadb

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

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

diffstat:
 mariadb104-server/Makefile             | 1 +
 mariadb104-server/files/mariadb.sh     | 4 ++--
 mariadb104-server/files/smf/mariadb.sh | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diffs:
diff --git a/mariadb104-server/Makefile b/mariadb104-server/Makefile
index e994b730ac..ea9e88d4cc 100644
--- a/mariadb104-server/Makefile
+++ b/mariadb104-server/Makefile
@@ -47,6 +47,7 @@ FILES_SUBST+=		MARIADB_DATADIR=${MARIADB_DATADIR}
 FILES_SUBST+=		MARIADB_USER=${MARIADB_USER} MARIADB_GROUP=${MARIADB_GROUP}
 BUILD_DEFS+=		MARIADB_DATADIR
 
+OWN_DIRS+=		${VARBASE}/run/mariadb ${MARIADB_USER} ${MARIADB_GROUP} 0700
 OWN_DIRS+=		${VARBASE}/log/mariadb ${MARIADB_USER} ${MARIADB_GROUP} 0700
 
 .include "../../archivers/lz4/buildlink3.mk"
diff --git a/mariadb104-server/files/mariadb.sh b/mariadb104-server/files/mariadb.sh
index 38493d8f66..8ab127672a 100644
--- a/mariadb104-server/files/mariadb.sh
+++ b/mariadb104-server/files/mariadb.sh
@@ -15,14 +15,14 @@ fi
 name="mariadb"
 rcvar=${name}
 command="@PREFIX@/sbin/mysqld"
-command_args="--pid-file=@VARBASE@/run/mariadb.pid"
+command_args="--pid-file=@VARBASE@/run/mariadb/mariadb.pid"
 command_args="${command_args} --user=@MARIADB_USER@"
 command_args="${command_args} --datadir=@MARIADB_DATADIR@"
 command_args="${command_args} --log-error=@VARBASE@/log/mariadb/error.log &"
 extra_commands="initdb"
 initdb_cmd="mariadb_initdb"
 start_precmd="mariadb_prestart"
-pidfile="@VARBASE@/run/mariadb.pid"
+pidfile="@VARBASE@/run/mariadb/mariadb.pid"
 
 mariadb_initdb() {
         if [ -f @MARIADB_DATADIR@/mysql/host.frm ]; then
diff --git a/mariadb104-server/files/smf/mariadb.sh b/mariadb104-server/files/smf/mariadb.sh
index c5993e1f89..718e4daf1c 100644
--- a/mariadb104-server/files/smf/mariadb.sh
+++ b/mariadb104-server/files/smf/mariadb.sh
@@ -7,7 +7,7 @@
 
 . /lib/svc/share/smf_include.sh
 
-PIDFILE="@VARBASE@/run/mariadb.pid"
+PIDFILE="@VARBASE@/run/mariadb/mariadb.pid"
 
 ulimit -n 10240
 


Home | Main Index | Thread Index | Old Index