diff --git a/services/apache/README.md b/services/apache/README.md index 762454f1..e44bbc84 100644 --- a/services/apache/README.md +++ b/services/apache/README.md @@ -24,8 +24,6 @@ Tested on: * OpenStack: * CentOs 5: imageId "1234" CentOS 5.6 64-bit, hardwareId "103" standard.large - 4 vCPU / 8 GB RAM / 240 GB HD , az-1.region-a.geo-1 -We disable the requiretty flag in /etc/sudoers on the installed VMs, so that Cloudify will be able to invoke remote ssh commands as a sudoer. This feature will be a part of Cloudify in the near future. -Until then, please use the [Cloud Drivers Repository](https://github.com/CloudifySource/cloudify-cloud-drivers). Synopsis -------- diff --git a/services/apacheLB/README.md b/services/apacheLB/README.md index c3748da4..bdcc518b 100644 --- a/services/apacheLB/README.md +++ b/services/apacheLB/README.md @@ -27,8 +27,6 @@ Tested on: * Rackspace: * CentOs 6: imageId "118", hardwareId "4" (2GB server = 2G RAM 80 GB HD). -We disable the requiretty flag in /etc/sudoers on the installed VMs, so that Cloudify will be able to invoke remote ssh commands as a sudoer. This feature will be a part of Cloudify in the near future. -Until then, please use the [Cloud Drivers Repository](https://github.com/CloudifySource/cloudify-cloud-drivers). Synopsis -------- diff --git a/services/mysql/README.md b/services/mysql/README.md index 77b730fc..ceb94636 100644 --- a/services/mysql/README.md +++ b/services/mysql/README.md @@ -29,9 +29,6 @@ Tested on: * Rackspace: * CentOs 6: imageId "118", hardwareId "4" (2GB server = 2G RAM 80 GB HD). - We disable the requiretty flag in /etc/sudoers on the installed VMs, so that Cloudify will be able to invoke remote ssh commands as a sudoer. This feature will be a part of Cloudify in the near future. -Until then, please use the [Cloud Drivers Repository](https://github.com/CloudifySource/cloudify-cloud-drivers). - Synopsis diff --git a/services/mysql/install.sh b/services/mysql/install.sh index 2b5aa2e7..69113c77 100644 --- a/services/mysql/install.sh +++ b/services/mysql/install.sh @@ -22,9 +22,9 @@ function error_exit { } function killMySqlProcess { - ps -ef | grep -iE "mysql" | grep -ivE "gigaspaces|GSC|GSA|grep" + ps -ef | grep -iE "mysql" | grep -ivE "install|gigaspaces|GSC|GSA|grep" if [ $? -eq 0 ] ; then - ps -ef | grep -iE "mysql" | grep -ivE "gigaspaces|GSC|GSA|grep" | awk '{print $2}' | xargs sudo kill -9 + ps -ef | grep -iE "mysql" | grep -ivE "install|gigaspaces|GSC|GSA|grep" | awk '{print $2}' | xargs sudo kill -9 fi } @@ -55,6 +55,17 @@ sudo rm -rf /etc/my.cnf || error_exit $? "Failed on: sudo rm -rf /etc/my.cnf" sudo rm -rf /var/log/mysql* || error_exit $? "Failed on: sudo rm -rf /var/log/mysql*" #sudo rm -f /home/`whoami`/{.,}*mysql* || error_exit $? "Failed on: sudo rm -f /home/`whoami`/{.,}*mysql*" +groupExists=`grep -c mysql /etc/group` + +if [ $groupExists -eq 0 ] ; then + groupadd mysql +fi + +userExists=`grep -c "mysql" /etc/passwd` +if [ $userExists -eq 0 ] ; then + useradd mysql -g mysql +fi + echo "Using yum. Installing mysql on one of the following : Red Hat, CentOS, Fedora, Amazon" # This master-slave implementation requires mysql5.1+ version. diff --git a/services/mysql/uninstall.sh b/services/mysql/uninstall.sh index 4cccd5e2..977cc7d5 100644 --- a/services/mysql/uninstall.sh +++ b/services/mysql/uninstall.sh @@ -23,7 +23,7 @@ echo "#1 Killing old mysql process if exists..." killMySqlProcess echo "Removing previous mysql installation if exists..." -sudo yum -y -q remove mysql mysql-server +sudo yum -y -q remove mysql* mysql-server # The following two statements are used since in some cases, there are leftovers after uninstall echo "Removing old stuff if exists..."