From 4d97d5fac309ce0d66938e5ccd0349e2660d4e23 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sat, 17 Jun 2017 22:40:44 +0300 Subject: [sdc] update code of sdc Change-Id: If9f37c80b659cb67b34d18e6c019defecca58b9a Signed-off-by: Michael Lando --- .../scripts/apache_start_detection.groovy | 6 --- .../CI/originalResources/scripts/install_apache.sh | 53 ---------------------- .../CI/originalResources/scripts/start_apache.sh | 10 ---- 3 files changed, 69 deletions(-) delete mode 100644 catalog-fe/src/test/resources/CI/originalResources/scripts/apache_start_detection.groovy delete mode 100644 catalog-fe/src/test/resources/CI/originalResources/scripts/install_apache.sh delete mode 100644 catalog-fe/src/test/resources/CI/originalResources/scripts/start_apache.sh (limited to 'catalog-fe/src/test/resources/CI/originalResources/scripts') diff --git a/catalog-fe/src/test/resources/CI/originalResources/scripts/apache_start_detection.groovy b/catalog-fe/src/test/resources/CI/originalResources/scripts/apache_start_detection.groovy deleted file mode 100644 index 93d732e0cd..0000000000 --- a/catalog-fe/src/test/resources/CI/originalResources/scripts/apache_start_detection.groovy +++ /dev/null @@ -1,6 +0,0 @@ -import org.cloudifysource.dsl.utils.ServiceUtils - -println "apache_start_detection.groovy: port http=${PORT} ..." -def isPortOccupied = ServiceUtils.isPortOccupied(Integer.parseInt(PORT)) -println "apache_start_detection.groovy: isPortOccupied http=${PORT} ... ${isPortOccupied}" -return isPortOccupied diff --git a/catalog-fe/src/test/resources/CI/originalResources/scripts/install_apache.sh b/catalog-fe/src/test/resources/CI/originalResources/scripts/install_apache.sh deleted file mode 100644 index a77f9a13f8..0000000000 --- a/catalog-fe/src/test/resources/CI/originalResources/scripts/install_apache.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -echo "Using apt-get. Installing apache2 on one of the following : Debian, Ubuntu, Mint" -LOCK="/tmp/lockaptget" -DEFAULT_PORT=80 - -while true; do - if mkdir "${LOCK}" &>/dev/null; then - echo "Apache take the lock" - break; - fi - echo "Waiting the end of one of our recipes..." - sleep 0.5 -done - -while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do - echo "Waiting for other software managers to finish..." - sleep 0.5 -done - -sudo rm -f /var/lib/dpkg/lock -sudo apt-get update || (sleep 15; sudo apt-get update || exit ${1}) -sudo apt-get install -y -q apache2 || exit ${1} -rm -rf "${LOCK}" - -sudo /etc/init.d/apache2 stop -if [ ! -d $DOC_ROOT ]; then - eval "sudo mkdir -p $DOC_ROOT" -fi -eval "sudo chown -R www-data:www-data $DOC_ROOT" - -if [[ ("$PORT" == "$DEFAULT_PORT") ]]; then - echo "Use default port for Apache : $DEFAULT_PORT" -else - echo "Replacing port $DEFAULT_PORT with $PORT..." - sudo sed -i -e "s/$DEFAULT_PORT/$PORT/g" /etc/apache2/ports.conf || exit ${1} -fi - -echo "Change config of apache2" -if sudo test -f "/etc/apache2/sites-available/default"; then - echo "Change the DocumentRoot of apache2 on Ubuntu < 14.04" - sudo sed -i -e "s#DocumentRoot /var/www#DocumentRoot $DOC_ROOT#g" /etc/apache2/sites-available/default -fi -if sudo test -f "/etc/apache2/sites-available/000-default.conf"; then - echo "Change the DocumentRoot of Apache2 on Ubuntu >= 14.04" - sudo sed -i -e "s#DocumentRoot /var/www/html#DocumentRoot $DOC_ROOT#g" /etc/apache2/sites-available/000-default.conf -fi - -sudo bash -c "echo ServerName localhost >> /etc/apache2/apache2.conf" - -echo "Start apache2 whith new conf" -sudo /etc/init.d/apache2 start -echo "End of $0" diff --git a/catalog-fe/src/test/resources/CI/originalResources/scripts/start_apache.sh b/catalog-fe/src/test/resources/CI/originalResources/scripts/start_apache.sh deleted file mode 100644 index 478c56edf5..0000000000 --- a/catalog-fe/src/test/resources/CI/originalResources/scripts/start_apache.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -service="apache2" - -if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 )) -then - sudo /etc/init.d/$service restart -else - sudo /etc/init.d/$service start -fi -- cgit 1.2.3-korg