Sha256: f0d0c810c179d7a07d16becb7d664ae4938367f702a2bfc8870ec09329b4cbe0

Contents?: true

Size: 787 Bytes

Versions: 4

Compression:

Stored size: 787 Bytes

Contents

#!/bin/sh

set -e
set -u

source ~/.lhm

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
bin/lhm-spec-setup-cluster.sh

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
bin/lhm-spec-grants.sh

trap lhmkill SIGTERM SIGINT

wait

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
sbader-lhm-1.1.0 bin/lhm-spec-clobber.sh
lhm-1.1.0 bin/lhm-spec-clobber.sh
lhm-1.0.3 bin/lhm-spec-clobber.sh
lhm-1.0.2 bin/lhm-spec-clobber.sh