You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"Error: sudo is not available or requires a password. This script needs to be able to use sudo, without password, from the userID that invokes it ($(whoami))"
383
+
echo"To get your setup correct, you may like to use a tool like visudo (use 'sudo visudo' or 'su' and then 'visudo') and consider adding the following line to the file:"
384
+
echo"$(whoami) ALL=(ALL) NOPASSWD:ALL"
385
+
echo"If you do not have sudo installed yet, try 'su' and then 'yum install sudo' or the apt-get equivalent"
386
+
echo"Terminating now."
387
+
exit 1
388
+
fi
389
+
}
390
+
372
391
if [[ -z"${ps_version}" ]];then ps_version="5.7";fi
373
392
if [[ -z"${pxc_version}" ]];then pxc_version="5.7";fi
374
393
if [[ -z"${ms_version}" ]];then ms_version="8.0";fi
375
394
if [[ -z"${md_version}" ]];then md_version="10.2";fi
376
395
if [[ -z"${mo_version}" ]];then mo_version="3.4";fi
377
396
if [[ -z"${REPLCOUNT}" ]];then REPLCOUNT="1";fi
378
397
if [[ -z"${ova_memory}" ]];then ova_memory="2048";fi
398
+
if [[ -z"${pgsql_version}" ]];then pgsql_version="10.5";fi
379
399
380
400
if [[ -z"$query_source" ]];then
381
401
query_source=perfschema
@@ -650,7 +670,11 @@ get_basedir(){
650
670
BASE_TAR=$(ls -1td $SERVER_STRING2>/dev/null | grep ".tar"| head -n1)
651
671
if [ !-z$BASE_TAR ];then
652
672
tar -xzf $BASE_TAR
653
-
BASEDIR=$(ls -1td $SERVER_STRING2>/dev/null | grep -v ".tar"| head -n1)
673
+
if [[ "${PRODUCT_NAME}"=="postgresql" ]];then
674
+
BASEDIR=$(ls -1td pgsql 2>/dev/null | grep -v ".tar"| head -n1)
675
+
else
676
+
BASEDIR=$(ls -1td $SERVER_STRING2>/dev/null | grep -v ".tar"| head -n1)
677
+
fi
654
678
BASEDIR="$WORKDIR/$BASEDIR"
655
679
rm -rf $BASEDIR/node*
656
680
else
@@ -670,7 +694,11 @@ get_basedir(){
670
694
BASE_TAR=$(ls -1td $SERVER_STRING2>/dev/null | grep ".tar"| head -n1)
671
695
if [ !-z$BASE_TAR ];then
672
696
tar -xzf $BASE_TAR
673
-
BASEDIR=$(ls -1td $SERVER_STRING2>/dev/null | grep -v ".tar"| head -n1)
697
+
if [[ "${PRODUCT_NAME}"=="postgresql" ]];then
698
+
BASEDIR=$(ls -1td pgsql 2>/dev/null | grep -v ".tar"| head -n1)
699
+
else
700
+
BASEDIR=$(ls -1td $SERVER_STRING2>/dev/null | grep -v ".tar"| head -n1)
701
+
fi
674
702
BASEDIR="$WORKDIR/$BASEDIR"
675
703
if [[ "${CLIENT_NAME}"=="mo" ]];then
676
704
sudo rm -rf $BASEDIR/data
@@ -782,6 +810,10 @@ add_clients(){
782
810
NODE_NAME="MS_NODE"
783
811
get_basedir mysql "mysql-${ms_version}*""MySQL Server binary tar ball"${ms_version}
0 commit comments