minor mods to script
[ga4php.git] / contrib / setupserver.sh
1 #!/bin/sh
2
3 ####################
4 # The purpose of this script is to setup a built ubuntu 10.04
5 # server as an auth server with next-to zero input from the user.
6 # This script will automagically download components
7 # from the ga4php site and install them locally on the machine
8 # it will also install all packages required for the system to work
9
10 print_usage() {
11         echo "Usage: $0 dedicated|shared"
12         echo "Dedicated means the website will be hosted as /"
13         echo "Shared means the website will be hosted as /ga"
14 }
15
16 if [ "x$1" = "x" ]
17 then
18         print_usage
19         exit 0
20 fi
21
22 if [ "$USER" != "root" ]
23 then
24         echo "This script must be run as root in order to function"
25         exit 0
26 fi
27
28 case "$1" in
29         "dedicated")
30                 echo "Installing as dedicated"
31         ;;
32         "shared")
33                 echo "Installing as shared"
34         ;;
35         *)
36         print_usage
37         exit 0
38 esac
39