aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2010-12-28 02:01:03 +0800
committerale <ale@FreeBSD.org>2010-12-28 02:01:03 +0800
commitca4ba89bf3b7f2d51e0f13fad5a7e1e13328ef0d (patch)
tree9578d380f47df9377cf00e424c3daf4a278cc136 /databases
parentd705e17518650af90b0eb9bc5a0a7c608fa61b90 (diff)
downloadfreebsd-ports-gnome-ca4ba89bf3b7f2d51e0f13fad5a7e1e13328ef0d.tar.gz
freebsd-ports-gnome-ca4ba89bf3b7f2d51e0f13fad5a7e1e13328ef0d.tar.zst
freebsd-ports-gnome-ca4ba89bf3b7f2d51e0f13fad5a7e1e13328ef0d.zip
Allow custom pidfile.
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql55-server/files/mysql-server.sh.in5
-rw-r--r--databases/percona55-server/files/mysql-server.sh.in5
2 files changed, 6 insertions, 4 deletions
diff --git a/databases/mysql55-server/files/mysql-server.sh.in b/databases/mysql55-server/files/mysql-server.sh.in
index bc747df597ed..d7a666b6cf6f 100644
--- a/databases/mysql55-server/files/mysql-server.sh.in
+++ b/databases/mysql55-server/files/mysql-server.sh.in
@@ -16,6 +16,8 @@
# just before mysql starts.
# mysql_dbdir (str): Default to "/var/db/mysql"
# Base database directory.
+# mysql_pidfile (str): Custum PID file path and name.
+# Default to "${mysql_dbdir}/${hostname}.pid".
# mysql_args (str): Custom additional arguments to be passed
# to mysqld_safe (default empty).
#
@@ -30,11 +32,10 @@ load_rc_config $name
: ${mysql_enable="NO"}
: ${mysql_limits="NO"}
: ${mysql_dbdir="/var/db/mysql"}
-: ${mysql_args=""}
mysql_user="mysql"
mysql_limits_args="-e -U ${mysql_user}"
-pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
+pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"}
command="/usr/sbin/daemon"
command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
procname="%%PREFIX%%/libexec/mysqld"
diff --git a/databases/percona55-server/files/mysql-server.sh.in b/databases/percona55-server/files/mysql-server.sh.in
index bc747df597ed..d7a666b6cf6f 100644
--- a/databases/percona55-server/files/mysql-server.sh.in
+++ b/databases/percona55-server/files/mysql-server.sh.in
@@ -16,6 +16,8 @@
# just before mysql starts.
# mysql_dbdir (str): Default to "/var/db/mysql"
# Base database directory.
+# mysql_pidfile (str): Custum PID file path and name.
+# Default to "${mysql_dbdir}/${hostname}.pid".
# mysql_args (str): Custom additional arguments to be passed
# to mysqld_safe (default empty).
#
@@ -30,11 +32,10 @@ load_rc_config $name
: ${mysql_enable="NO"}
: ${mysql_limits="NO"}
: ${mysql_dbdir="/var/db/mysql"}
-: ${mysql_args=""}
mysql_user="mysql"
mysql_limits_args="-e -U ${mysql_user}"
-pidfile="${mysql_dbdir}/`/bin/hostname`.pid"
+pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"}
command="/usr/sbin/daemon"
command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_dbdir}/my.cnf --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}"
procname="%%PREFIX%%/libexec/mysqld"