summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-06-06 09:26:53 +0300
committerAndrei Karas <akaras@inbox.ru>2020-06-16 03:43:42 +0300
commitd27c70c87ba0728bd12193ceb15484a1919fa068 (patch)
tree52f4dc0fe9d84b3ba46b90d0f9bf4cc507fa955e /tools
parent93f613c3565151fd8478a6b7563d2af1850b2a86 (diff)
downloadhercules-d27c70c87ba0728bd12193ceb15484a1919fa068.tar.gz
hercules-d27c70c87ba0728bd12193ceb15484a1919fa068.tar.bz2
hercules-d27c70c87ba0728bd12193ceb15484a1919fa068.tar.xz
hercules-d27c70c87ba0728bd12193ceb15484a1919fa068.zip
Update travis.sh with fixes for travis and new os
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci/travis.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh
index a268f38eb..2e0684dbf 100755
--- a/tools/ci/travis.sh
+++ b/tools/ci/travis.sh
@@ -37,6 +37,7 @@ function usage {
echo " $0 build [configure args]"
echo " $0 test <dbname> [dbuser] [dbpassword] [dbhost]"
echo " $0 getplugins"
+ echo " $0 startmysql"
exit 1
}
@@ -154,12 +155,14 @@ case "$MODE" in
;;
adduser)
echo "Adding user $NEWUSER as $DBUSER, with access to database $DBNAME..."
- echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true
mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true
- echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true
mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true
- echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';"' || true
mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true
+ mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="ALTER USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true
+ mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true
+ mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true
+ mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="ALTER USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true
+
;;
build)
(cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error."
@@ -251,6 +254,13 @@ EOF
# echo "Plugin not found, skipping advanced tests."
#fi
;;
+ startmysql)
+ echo "Starting mysql..."
+ service mysql status || true
+ service mysql stop || true
+ service mysql start || true
+ service mysql status || true
+ ;;
*)
usage
;;