Blame tests/r_lamp/0_lamp_install.sh

Karanbir Singh 2dd0be
#!/bin/bash
Karanbir Singh 2dd0be
# Author: Steve Barnes (steve@echo.id.au)
Christoph Galuschka 2e276f
#	  Christoph Galuschka <christoph.galuschka@chello.at>
Christoph Galuschka 2e276f
Christoph Galuschka 2e276f
t_Log "Running $0 - attempting to install LAMP stack."
Karanbir Singh 2dd0be
Christoph Galuschka 269271
# MySQL
Christoph Galuschka 269271
# starting with 5.10, we have to differ between mysql55 and mysql
Christoph Galuschka 269271
if [ $centos_ver = 5 ]
Christoph Galuschka 269271
then
Christoph Galuschka a76c03
  t_InstallPackage mysql-server mysql55-mysql-server httpd php
Christoph Galuschka 269271
else
Christoph Galuschka 269271
  t_InstallPackage mysql-server httpd php
Christoph Galuschka 269271
fi
Christoph Galuschka 269271
Christoph Galuschka 38b41d
t_ServiceControl httpd stop
Christoph Galuschka 38b41d
ps ax | grep -v grep | grep -q httpd
Christoph Galuschka 38b41d
if [ $? = 0 ]
Christoph Galuschka 38b41d
then
Christoph Galuschka 38b41d
  t_Log "httpd still running - killing"
Christoph Galuschka 38b41d
  killall -9 httpd
Christoph Galuschka 38b41d
fi
Christoph Galuschka 38b41d
sleep 1
Christoph Galuschka 38b41d
t_ServiceControl httpd start