summaryrefslogtreecommitdiffstats
path: root/testing/source/mariadb/rc.mysqld
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2021-05-03 19:58:20 +0000
committer Eric Hameleers <alien@slackware.com>2021-05-03 23:59:55 +0200
commit4c189bc9bc307a9cd477afb9ff560c7138f8bdd0 (patch)
tree855f9187c0d6bca9dc967203b23c23adb7b3eba3 /testing/source/mariadb/rc.mysqld
parentd29973a5051109bc0eab591df07eb128318d2c9c (diff)
downloadcurrent-4c189bc9bc307a9cd477afb9ff560c7138f8bdd0.tar.gz
current-4c189bc9bc307a9cd477afb9ff560c7138f8bdd0.tar.xz
Mon May 3 19:58:20 UTC 202120210503195820
a/kernel-firmware-20210503_3f23f51-noarch-1.txz: Upgraded. ap/mariadb-10.5.9-x86_64-1.txz: Upgraded. Reverted to the latest stable release. d/mercurial-5.8-x86_64-1.txz: Upgraded. kde/calligra-3.2.1-x86_64-8.txz: Rebuilt. Recompiled against poppler-21.05.0. kde/cantor-21.04.0-x86_64-2.txz: Rebuilt. Recompiled against poppler-21.05.0. kde/kfilemetadata-5.81.0-x86_64-2.txz: Rebuilt. Recompiled against poppler-21.05.0. kde/kile-2.9.93-x86_64-8.txz: Rebuilt. Recompiled against poppler-21.05.0. kde/kitinerary-21.04.0-x86_64-2.txz: Rebuilt. Recompiled against poppler-21.05.0. kde/krita-4.4.3-x86_64-4.txz: Rebuilt. Recompiled against poppler-21.05.0. kde/okular-21.04.0-x86_64-2.txz: Rebuilt. Recompiled against poppler-21.05.0. l/isl-0.24-x86_64-1.txz: Upgraded. l/poppler-21.05.0-x86_64-1.txz: Upgraded. Shared library .so-version bump. l/python-pygments-2.9.0-x86_64-1.txz: Upgraded. n/ethtool-5.12-x86_64-1.txz: Upgraded. n/httpd-2.4.47-x86_64-2.txz: Rebuilt. Recompiled against the mariadb-10.5.9 shared libraries. n/postfix-3.6.0-x86_64-2.txz: Rebuilt. Recompiled against the mariadb-10.5.9 shared libraries. xap/gparted-1.3.0-x86_64-1.txz: Upgraded. testing/packages/mariadb-10.6.0-x86_64-1.txz: Upgraded. Since this is still considered alpha and not production ready, we'll put it in /testing for now. Unless you're using an Atom (or other 32-bit processor affected by the illegal instruction issue) it's probably best to stick with mariadb-10.5.9.
Diffstat (limited to 'testing/source/mariadb/rc.mysqld')
-rw-r--r--testing/source/mariadb/rc.mysqld87
1 files changed, 87 insertions, 0 deletions
diff --git a/testing/source/mariadb/rc.mysqld b/testing/source/mariadb/rc.mysqld
new file mode 100644
index 000000000..1844fe27a
--- /dev/null
+++ b/testing/source/mariadb/rc.mysqld
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Start/stop/restart mysqld.
+#
+# Copyright 2003 Patrick J. Volkerding, Concord, CA
+# Copyright 2003 Slackware Linux, Inc., Concord, CA
+# Copyright 2008, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+#
+# This program comes with NO WARRANTY, to the extent permitted by law.
+# You may redistribute copies of this program under the terms of the
+# GNU General Public License.
+
+# To start MariaDB automatically at boot, be sure this script is executable:
+# chmod 755 /etc/rc.d/rc.mysqld
+
+# Before you can run MariaDB, you must have a database. To install an initial
+# database, do this as root:
+#
+# mysql_install_db --user=mysql
+#
+# Note that the mysql user must exist in /etc/passwd, and the created files
+# will be owned by this dedicated user. This is important, or else mysql
+# (which runs as user "mysql") will not be able to write to the database
+# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
+#
+# To increase system security, consider using "mysql_secure_installation"
+# as well. For more information on this tool, please read:
+# man mysql_secure_installation
+
+# To allow outside connections to the database comment out the next line.
+# If you don't need incoming network connections, then leave the line
+# uncommented to improve system security.
+SKIP="--skip-networking"
+
+# Start mysqld:
+mysqld_start() {
+ if [ -x /usr/bin/mysqld_safe ]; then
+ # If there is an old PID file (no mysqld running), clean it up:
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
+ echo "Cleaning up old /var/run/mysql/mysql.pid."
+ rm -f /var/run/mysql/mysql.pid
+ fi
+ fi
+
+ /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP &
+ fi
+}
+
+# Stop mysqld:
+mysqld_stop() {
+ # If there is no PID file, ignore this request...
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ PID=$(cat /var/run/mysql/mysql.pid)
+ kill $PID
+ # Wait at least one minute for it to exit, as we don't know how big the DB is...
+ for second in $(seq 0 60) ; do
+ if [ ! -r /var/run/mysql/mysql.pid ]; then
+ break;
+ fi
+ sleep 1
+ done
+ if [ "$second" = "60" ]; then
+ echo "WARNING: Gave up waiting for mysqld to exit!"
+ sleep 15
+ fi
+ fi
+}
+
+# Restart mysqld:
+mysqld_restart() {
+ mysqld_stop
+ mysqld_start
+}
+
+case "$1" in
+'start')
+ mysqld_start
+ ;;
+'stop')
+ mysqld_stop
+ ;;
+'restart')
+ mysqld_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac