added a setup server script to automatically setup an ubuntu server as an auth server
authorpaulr <me@pjr.cc>
Wed, 1 Dec 2010 17:07:34 +0000 (04:07 +1100)
committerpaulr <me@pjr.cc>
Wed, 1 Dec 2010 17:07:34 +0000 (04:07 +1100)
contrib/setupserver.sh [new file with mode: 0644]

diff --git a/contrib/setupserver.sh b/contrib/setupserver.sh
new file mode 100644 (file)
index 0000000..96729fb
--- /dev/null
@@ -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
+