From 18345c8298d2ce1265403f7627226405bd63d374 Mon Sep 17 00:00:00 2001 From: paulr Date: Thu, 2 Dec 2010 04:07:34 +1100 Subject: [PATCH] added a setup server script to automatically setup an ubuntu server as an auth server --- contrib/setupserver.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) create mode 100644 contrib/setupserver.sh diff --git a/contrib/setupserver.sh b/contrib/setupserver.sh new file mode 100644 index 0000000..96729fb --- /dev/null +++ b/contrib/setupserver.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +#################### +# The purpose of this script is to setup a built ubuntu 10.04 +# server as an auth server with next-to zero input from the user. +# This script will automagically download components +# from the ga4php site and install them locally on the machine +# it will also install all packages required for the system to work + +print_usage() { + echo "Usage: $0 dedicated|shared" + echo "Dedicated means the website will be hosted as /" + echo "Shared means the website will be hosted as /ga" +} + +if [ "x$1" = "x" ] +then + print_usage + exit 0 +fi + +if [ "$USER" != "root" ] +then + echo "This script must be run as root in order to function" + exit 0 +fi + +case "$1" in + "dedicated") + echo "Installing as dedicated" + ;; + "shared") + echo "Installing as shared" + ;; + *) + print_usage + exit 0 +esac + -- 1.7.0.4