Sha256: 3eea7d855bc1ed9297b53e60327146d2bf1ded718ff443f5b3ae21571fb77541

Contents?: true

Size: 780 Bytes

Versions: 1

Compression:

Stored size: 780 Bytes

Contents

#!/bin/sh

set -e
set -u

source .config

lhmkill() {
  ps -ef | gsed -n "/[m]ysqld.*lhm-cluster/p" | awk '{ print $2 }' | xargs kill
  sleep 5
}

echo stopping other running mysql instance
launchctl remove com.mysql.mysqld || { echo launchctl did not remove mysqld; }
"$mysqldir"/bin/mysqladmin shutdown || { echo mysqladmin did not shut down anything; }

echo killing lhm-cluster
lhmkill

echo removing $basedir
rm -rf "$basedir"

echo setting up cluster
spec/config/setup-cluster

echo staring instances
"$mysqldir"/bin/mysqld --defaults-file="$basedir/master/my.cnf" 2>&1 >$basedir/master/lhm.log &
"$mysqldir"/bin/mysqld --defaults-file="$basedir/slave/my.cnf" 2>&1 >$basedir/slave/lhm.log &
sleep 5

echo running grants
spec/config/grants

trap lhmkill SIGTERM SIGINT

wait

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lhm-1.0.0.rc4 spec/config/clobber