New deploy helper script

This commit is contained in:
Jean-Marie RENOUARD 2018-03-05 09:37:51 +01:00
parent bca1ad849d
commit 1c51f44282

12
build/deployOn Executable file
View 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