freebsd-ports/databases/mysql40-server/files/mysql-server.sh
Peter Pentchev b62043221b Update to MySQL 4.0.9 after a repo-copy from the mysql323-* ports.
PR:			45543
Submitted by:		Alex Dupre <sysadmin@alexdupre.com>
Repo-copy approved by:	portmgr (will)
Repo-copy performed by:	cvs (josefk)
2003-01-31 16:02:39 +00:00

28 lines
546 B
Bash

#!/bin/sh
DB_DIR=%%DB_DIR%%
PIDFILE=${DB_DIR}/`/bin/hostname -s`.pid
case "$1" in
start)
if [ -x %%PREFIX%%/bin/mysqld_safe ]; then
/usr/bin/limits -U mysql \
%%PREFIX%%/bin/mysqld_safe --user=mysql --datadir=${DB_DIR} --pid-file=${PIDFILE} > /dev/null &
echo -n ' mysqld'
fi
;;
stop)
if [ -f ${PIDFILE} ]; then
/bin/kill `cat ${PIDFILE}` > /dev/null 2>&1 && echo -n ' mysqld'
else
echo "mysql-server isn't running"
fi
;;
*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
exit 64
;;
esac