From 80dcb6bc02233994bea32218183364efd14cc469 Mon Sep 17 00:00:00 2001 From: paulr Date: Thu, 2 Dec 2010 04:21:10 +1100 Subject: [PATCH] added more setup server.sh code --- contrib/setupserver.sh | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 46 insertions(+), 1 deletions(-) diff --git a/contrib/setupserver.sh b/contrib/setupserver.sh index 96729fb..c72ab4f 100755 --- a/contrib/setupserver.sh +++ b/contrib/setupserver.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #################### # The purpose of this script is to setup a built ubuntu 10.04 @@ -37,3 +37,48 @@ case "$1" in exit 0 esac +# ok, we're ready to function, tell the user some stuff +echo "This script will now install packages required for the server to work" +echo "as well as install the auth server and start scripts into /opt/gaas and" +echo "/etc/init.d/. I will try to do this as quitely as possible" + +read -p "are you sure [y/N]? " surity + +if [ "x$surity" != "xy" ] +then + echo "Bailing, must hit y if you are sure" + exit 0 +fi + +# first install apt packages for apache and php +echo "Beginning install of apt-get packages" +apt-get install -y apache2 libapache2-mod-php5 php-soap php5-ldap php5-cli php5-adodb subversion > /dev/null 2>&1 + +if [ "$?" != "0" ] +then + echo "There was a problem during install of apt-get packages" + exit 1 +fi + +echo "Apt-get packages installed, getting auth server code" + +# get the auth server code from svn +MYTMPDIR="/tmp/ga$RANDOM" +mkdir -p $MYTMPDIR +cd $MYTMPDIR +svn checkout http://ga4php.googlecode.com/svn/trunk/authserver authserver > /dev/null 2>&1 +if [ "$?" != "0" ] +then + echo "There was a problem downloading the source code.. bailing" + exit 2 +fi + +svn checkout http://ga4php.googlecode.com/svn/trunk/contrib contrib > /dev/null 2>&1 +if [ "$?" != "0" ] +then + echo "There was a problem downloading the source code.. bailing" + exit 2 +fi + +echo "Code downloaded, beginning installation" + -- 1.7.0.4