30 lines
556 B
Plaintext
30 lines
556 B
Plaintext
#!/sbin/sh
|
|
#
|
|
# Generated by Chef
|
|
#
|
|
|
|
. /lib/svc/share/smf_include.sh
|
|
|
|
PIDFILE=<%= @pid_file %>
|
|
|
|
ulimit -n 10240
|
|
|
|
case "$1" in
|
|
start)
|
|
<%= @base_dir %>/bin/mysqld --user=mysql \
|
|
--basedir=<%= @base_dir %> \
|
|
--datadir=<%= @data_dir %> \
|
|
--pid-file=${PIDFILE} \
|
|
--log-error=/var/log/mysql/error.log &
|
|
;;
|
|
stop)
|
|
[ -f ${PIDFILE} ] && kill `/usr/bin/head -1 ${PIDFILE}`
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop}" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit $SMF_EXIT_OK
|