New deploy helper script
This commit is contained in:
parent
bca1ad849d
commit
1c51f44282
1 changed files with 12 additions and 0 deletions
12
build/deployOn
Executable file
12
build/deployOn
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -xv
|
||||||
|
|
||||||
|
_DIR=$(dirname `readlink -f $0`)
|
||||||
|
|
||||||
|
|
||||||
|
ssh $1 mkdir /images/mysqltuner
|
||||||
|
rsync -avz ${_DIR}/.. $1:/images/mysqltuner
|
||||||
|
|
||||||
|
if [ "$2" = "run" ];then
|
||||||
|
ssh $1 "su - mysql -c 'cd /images/mysqltuner; perl mysqltuner.pl --verbose'"
|
||||||
|
fi
|
Loading…
Reference in a new issue