From: paulr Date: Wed, 1 Dec 2010 17:07:34 +0000 (+1100) Subject: added a setup server script to automatically setup an ubuntu server as an auth server X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=18345c8298d2ce1265403f7627226405bd63d374;p=ga4php.git added a setup server script to automatically setup an ubuntu server as an auth server --- 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 +