]> git.mjollnir.org Git - vserverctl.git/commitdiff
Added profiles
authorMartyn Smith <martyn@catalyst.net.nz>
Thu, 26 Apr 2007 10:06:10 +0000 (22:06 +1200)
committerMartyn Smith <martyn@sear.home>
Thu, 26 Apr 2007 10:06:10 +0000 (22:06 +1200)
56 files changed:
profile/base/aptsources [new file with mode: 0644]
profile/base/data/testfile1 [new file with mode: 0644]
profile/base/data/testfile2 [new file with mode: 0644]
profile/base/files [new file with mode: 0644]
profile/base/packages [new file with mode: 0644]
profile/base/post-host [new file with mode: 0644]
profile/base/post-vserver [new file with mode: 0644]
profile/base/pre-host [new file with mode: 0644]
profile/base/pre-vserver [new file with mode: 0644]
profile/base/profile.conf [new file with mode: 0644]
profile/base/remove-host [new file with mode: 0644]
profile/base/templates [new file with mode: 0644]
profile/mahara-dev/data/.bash_once [new file with mode: 0644]
profile/mahara-dev/data/config.php [new file with mode: 0644]
profile/mahara-dev/data/mahara.conf [new file with mode: 0644]
profile/mahara-dev/options [new file with mode: 0644]
profile/mahara-dev/packages [new file with mode: 0644]
profile/mahara-dev/pre-host [new file with mode: 0644]
profile/mahara-dev/pre-vserver [new file with mode: 0644]
profile/mahara-dev/profile.conf [new file with mode: 0644]
profile/mahara-dev/remove-host [new file with mode: 0644]
profile/mahara-dev/templates [new file with mode: 0644]
profile/mahara-trunk/aptsources [new file with mode: 0644]
profile/mahara-trunk/post-vserver [new file with mode: 0644]
profile/mahara-trunk/pre-host [new file with mode: 0644]
profile/mahara-trunk/profile.conf [new file with mode: 0644]
profile/mahara-trunk/remove-host [new file with mode: 0644]
profile/mason/data/.bash_once [new file with mode: 0644]
profile/mason/data/.bash_profile [new file with mode: 0644]
profile/mason/data/.bashrc [new file with mode: 0644]
profile/mason/data/.vimrc [new file with mode: 0644]
profile/mason/data/known_hosts [new file with mode: 0644]
profile/mason/data/nzrb.ini [new file with mode: 0644]
profile/mason/data/site.conf [new file with mode: 0644]
profile/mason/files [new file with mode: 0644]
profile/mason/options [new file with mode: 0644]
profile/mason/packages [new file with mode: 0644]
profile/mason/post-vserver [new file with mode: 0644]
profile/mason/profile.conf [new file with mode: 0644]
profile/mason/templates [new file with mode: 0644]
profile/php4/data/htdocs-martyn [new file with mode: 0644]
profile/php4/packages [new file with mode: 0644]
profile/php4/post-vserver [new file with mode: 0644]
profile/php4/profile.conf [new file with mode: 0644]
profile/php4/templates [new file with mode: 0644]
profile/php5/data/htdocs-martyn [new file with mode: 0644]
profile/php5/packages [new file with mode: 0644]
profile/php5/post-vserver [new file with mode: 0644]
profile/php5/profile.conf [new file with mode: 0644]
profile/php5/templates [new file with mode: 0644]
profile/sarge/profile.conf [new file with mode: 0644]
profile/webserver/post-host [new file with mode: 0644]
profile/webserver/profile.conf [new file with mode: 0644]
profile/webserver/remove-host [new file with mode: 0644]
profile/webserver/vservers.template.conf [new file with mode: 0644]
profile/woody/profile.conf [new file with mode: 0644]

diff --git a/profile/base/aptsources b/profile/base/aptsources
new file mode 100644 (file)
index 0000000..336ce83
--- /dev/null
@@ -0,0 +1,10 @@
+# Citylink Mirror
+deb http://ftp.nz.debian.org/debian/ etch main non-free
+deb-src http://ftp.nz.debian.org/debian/ etch main
+
+# Catalyst Packages
+deb http://debian.catalyst.net.nz/catalyst stable catalyst
+
+# Security Updates
+deb http://security.debian.org/ etch/updates main
+deb-src http://security.debian.org/ etch/updates main
diff --git a/profile/base/data/testfile1 b/profile/base/data/testfile1
new file mode 100644 (file)
index 0000000..e469c13
--- /dev/null
@@ -0,0 +1 @@
+i am testfile one and i have been successfully copied into the vserver, congratulations!
diff --git a/profile/base/data/testfile2 b/profile/base/data/testfile2
new file mode 100644 (file)
index 0000000..ef4dd77
--- /dev/null
@@ -0,0 +1 @@
+i am testfile two and i have been successfully copied into the vserver, congratulations!
diff --git a/profile/base/files b/profile/base/files
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/profile/base/packages b/profile/base/packages
new file mode 100644 (file)
index 0000000..6e42a85
--- /dev/null
@@ -0,0 +1,7 @@
+sudo
+vim
+ssh
+curl
+catalyst-martynsmith
+locales
+less
diff --git a/profile/base/post-host b/profile/base/post-host
new file mode 100644 (file)
index 0000000..75aad17
--- /dev/null
@@ -0,0 +1,9 @@
+# Copy martyn's password from the host
+grep -v '^martyn' ${VSROOT}/etc/shadow > /vserver/.shadow
+grep '^martyn' /etc/shadow >> /vserver/.shadow
+mv /vserver/.shadow ${VSROOT}/etc/shadow
+
+# Add a /etc/hosts entry on the HostOS
+cat /etc/hosts > /etc/hosts.new
+echo "${VSIPADDR}    ${VSNAME}" >> /etc/hosts.new
+mv /etc/hosts.new /etc/hosts
diff --git a/profile/base/post-vserver b/profile/base/post-vserver
new file mode 100644 (file)
index 0000000..bdefd10
--- /dev/null
@@ -0,0 +1,2 @@
+echo 'martyn   ALL=(ALL) ALL' >> /etc/sudoers
+
diff --git a/profile/base/pre-host b/profile/base/pre-host
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/profile/base/pre-vserver b/profile/base/pre-vserver
new file mode 100644 (file)
index 0000000..0a6fd31
--- /dev/null
@@ -0,0 +1,14 @@
+if [ "$VSRELEASE" = "sarge" ]; then
+    echo "running pwconv"
+    pwconv
+fi
+cp /usr/share/zoneinfo/NZ /etc/localtime
+echo '10.0.0.3    pg81' >> /etc/hosts
+echo '10.0.0.5    pg74' >> /etc/hosts
+echo "${VSIPADDR}    ${VSNAME}" >> /etc/hosts
+echo 'locales    locales/locales_to_be_generated select en_NZ ISO-8859-1, en_NZ.UTF-8 UTF-8' | debconf-set-selections
+
+
+echo 'debconf        debconf/priority select critical'                                           | debconf-set-selections
+echo 'exim4-config exim4/dc_eximconfig_configtype string mail sent by smarthost; no local mail'  | debconf-set-selections
+echo 'exim4-config exim4/dc_smarthost string smtp.catalyst.net.nz'                               | debconf-set-selections
diff --git a/profile/base/profile.conf b/profile/base/profile.conf
new file mode 100644 (file)
index 0000000..a371716
--- /dev/null
@@ -0,0 +1,11 @@
+parent               =
+release              = etch
+mirror               = http://debian.catalyst.net.nz/debian
+inherit-aptsources   = yes
+inherit-packages     = yes
+inherit-pre-vserver  = yes
+inherit-pre-host     = yes
+inherit-post-vserver = yes
+inherit-post-host    = yes
+inherit-files        = yes
+inherit-templates    = yes
diff --git a/profile/base/remove-host b/profile/base/remove-host
new file mode 100644 (file)
index 0000000..6d9d046
--- /dev/null
@@ -0,0 +1,7 @@
+# Remove /etc/hosts entry on the host OS
+grep -v "^${VSIPADDR}" /etc/hosts > /etc/hosts.new
+mv /etc/hosts.new /etc/hosts
+
+grep -v "^${VSNAME}" /home/martyn/.ssh/known_hosts > /home/martyn/.ssh/known_hosts.new
+chown martyn:martyn /home/martyn/.ssh/known_hosts.new
+mv /home/martyn/.ssh/known_hosts.new /home/martyn/.ssh/known_hosts
diff --git a/profile/base/templates b/profile/base/templates
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/profile/mahara-dev/data/.bash_once b/profile/mahara-dev/data/.bash_once
new file mode 100644 (file)
index 0000000..30a4f25
--- /dev/null
@@ -0,0 +1,14 @@
+# Check out and set up the mahara install
+cg-clone "git+ssh://git.catalyst.net.nz/var/git/mahara.git#__PROFILEOPTION_branch__" mahara
+sudo chown __PROFILEOPTION_username__:__PROFILEOPTION_username__ config.php
+mv config.php mahara/htdocs/
+mkdir mahara/logs/
+sudo chown www-data:www-data mahara/logs
+mkdir mahara/.patches
+sudo mkdir /var/lib/mahara
+sudo chown www-data:www-data /var/lib/mahara
+
+sudo apachectl restart
+
+# Make this file owned by the user. Might be nicer if the permissions could be controlled by the 'files' file...
+sudo chown $USER:$USER .bash_once
diff --git a/profile/mahara-dev/data/config.php b/profile/mahara-dev/data/config.php
new file mode 100644 (file)
index 0000000..f9139d4
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/**
+ * This program is part of Mahara
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * @package    mahara
+ * @subpackage core
+ * @author     Penny Leach <penny@catalyst.net.nz>
+ * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL
+ * @copyright  (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
+ *
+ */
+
+$cfg = new StdClass;
+
+
+// database connection details
+$cfg->dbtype   = 'postgres8';
+$cfg->dbhost   = 'pg81';
+$cfg->dbport   = 5432;
+$cfg->dbname   = '__VSNAME__';
+$cfg->dbuser   = 'martyn';
+$cfg->dbpass   = '';
+$cfg->dbprefix = '';
+
+// wwwroot - the web-visible path to your Mahara installation
+// Normally, this is automatically detected - if it doesn't work for you
+// then try specifying it here
+//$cfg->wwwroot = 'http://myhost.com/mahara/';
+
+// dataroot - uploaded files are stored here
+// must be writable by the webserver and outside document root.
+// Mahara will NOT RUN if this is inside your document root, because
+// this is a big security hole.
+$cfg->dataroot = '/var/lib/mahara';
+
+// system mail address. emails out come from this address.
+// if not specified, will default to noreply@ automatically detected host.
+// if that doesn't work or you want something else, then specify it here.
+// $cfg->noreplyaddress = 'noreply@myhost.com'
+
+// Logging configuration
+// For each log level, you can specify where the messages are displayed.
+// LOG_TARGET_SCREEN makes the error messages go to the screen - useful
+// when debugging but not on a live site!
+// LOG_TARGET_ERRORLOG makes the error messages go to the log as specified
+// by the apache ErrorLog directive. It's probably useful to have this on
+// for all log levels.
+// You can combine them with bitwise operations,
+// e.g. LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG
+//
+// This configuration is suitable for people running Mahara for the first
+// time. You will immediately see environment errors, and so can correct
+// them. You will be able to see other debugging information in your error
+// logs. Once your site is up and running you might want to remove the
+// environment level logging completely, and just log everything else to
+// the error log.
+$cfg->log_dbg_targets     = LOG_TARGET_ERRORLOG;
+$cfg->log_info_targets    = LOG_TARGET_ERRORLOG;
+$cfg->log_warn_targets    = LOG_TARGET_ERRORLOG;
+$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+// This configuration is suitable for developers. You will see all errors
+// and they will also be in the logs.
+//$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+//$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+//$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+//$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
+
+// The log levels that will generate backtraces. Useful for development,
+// but probably only warnings are useful on a live site.
+$cfg->log_backtrace_levels = LOG_LEVEL_WARN | LOG_LEVEL_ENVIRON;
+
+// mail handling
+// if you want mahara to use smtp servers to send mail, enter one or more here
+// blank means mahara will use the default PHP method.
+$cfg->smtphosts = 'smtp.catalyst.net.nz';
+// If you have specified an smtp server above, and the server requires authentication, 
+// enter them here
+// $cfg->smtpuser = '';
+// $cfg->smtppass = '';
+?>
diff --git a/profile/mahara-dev/data/mahara.conf b/profile/mahara-dev/data/mahara.conf
new file mode 100644 (file)
index 0000000..0ddf2ea
--- /dev/null
@@ -0,0 +1,12 @@
+NameVirtualHost *:80
+<VirtualHost *:80>
+    ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+    DocumentRoot /home/__PROFILEOPTION_username__/mahara/htdocs
+
+    <Directory /home/__PROFILEOPTION_username__/mahara/htdocs>
+        AllowOverride all
+    </Directory>
+
+    ErrorLog /home/__PROFILEOPTION_username__/mahara/logs/error.log
+    CustomLog /home/__PROFILEOPTION_username__/mahara/logs/access.log full
+</VirtualHost>
diff --git a/profile/mahara-dev/options b/profile/mahara-dev/options
new file mode 100644 (file)
index 0000000..bb5f06a
--- /dev/null
@@ -0,0 +1,2 @@
+username
+branch
diff --git a/profile/mahara-dev/packages b/profile/mahara-dev/packages
new file mode 100644 (file)
index 0000000..c7bc263
--- /dev/null
@@ -0,0 +1,14 @@
+apache
+libapache-mod-php5
+php5-pgsql
+php5-gd
+file
+clamav-daemon
+clamav-freshclam
+cogito
+make
+python
+sun-java5-jdk
+build-essential
+debhelper
+fakeroot
diff --git a/profile/mahara-dev/pre-host b/profile/mahara-dev/pre-host
new file mode 100644 (file)
index 0000000..eb0b531
--- /dev/null
@@ -0,0 +1,6 @@
+# Create the database for the mahara install
+vserver pg81 suexec postgres createdb ${VSNAME} -Omartyn -EUNICODE
+
+# Remove the tmp filesystem mounting
+grep -v tmp /etc/vservers/${VSNAME}/fstab > /etc/vservers/${VSNAME}/fstab.new
+mv /etc/vservers/${VSNAME}/fstab.new /etc/vservers/${VSNAME}/fstab
diff --git a/profile/mahara-dev/pre-vserver b/profile/mahara-dev/pre-vserver
new file mode 100644 (file)
index 0000000..ebdbf0a
--- /dev/null
@@ -0,0 +1 @@
+echo 'sun-java5-bin shared/accepted-sun-dlj-v1-1 boolean true' | debconf-set-selections
diff --git a/profile/mahara-dev/profile.conf b/profile/mahara-dev/profile.conf
new file mode 100644 (file)
index 0000000..b96aaa2
--- /dev/null
@@ -0,0 +1 @@
+parent               = webserver
diff --git a/profile/mahara-dev/remove-host b/profile/mahara-dev/remove-host
new file mode 100644 (file)
index 0000000..7398f97
--- /dev/null
@@ -0,0 +1,2 @@
+# Drop the database
+vserver pg81 suexec postgres dropdb ${VSNAME}
diff --git a/profile/mahara-dev/templates b/profile/mahara-dev/templates
new file mode 100644 (file)
index 0000000..aded7d8
--- /dev/null
@@ -0,0 +1,3 @@
+mahara.conf    /etc/apache/conf.d/
+config.php     /home/__PROFILEOPTION_username__/
+.bash_once     /home/__PROFILEOPTION_username__/
diff --git a/profile/mahara-trunk/aptsources b/profile/mahara-trunk/aptsources
new file mode 100644 (file)
index 0000000..a611b04
--- /dev/null
@@ -0,0 +1,2 @@
+# Mahara
+deb http://debian.mahara.org/ unstable mahara
diff --git a/profile/mahara-trunk/post-vserver b/profile/mahara-trunk/post-vserver
new file mode 100644 (file)
index 0000000..70abbf7
--- /dev/null
@@ -0,0 +1,8 @@
+echo 'debconf        debconf/priority select critical'                             | debconf-set-selections
+echo 'mahara-apache2 mahara/db_host string pg81'                                    | debconf-set-selections
+echo 'mahara-apache2 mahara/db_port string 5432'                                    | debconf-set-selections
+echo "mahara-apache2 mahara/db_name string ${VSNAME}"                               | debconf-set-selections
+echo 'mahara-apache2 mahara/db_user string martyn'                                  | debconf-set-selections
+echo "mahara-apache2 mahara/servername string ${VSNAME}.abelard.wgtn.cat-it.co.nz" | debconf-set-selections
+
+DEBCONF_FRONTEND=noninteractive apt-get install mahara-apache2 --assume-yes --force-yes
diff --git a/profile/mahara-trunk/pre-host b/profile/mahara-trunk/pre-host
new file mode 100644 (file)
index 0000000..ef29cf0
--- /dev/null
@@ -0,0 +1,2 @@
+vserver pg81 suexec postgres createdb ${VSNAME} -Omartyn -EUNICODE
+
diff --git a/profile/mahara-trunk/profile.conf b/profile/mahara-trunk/profile.conf
new file mode 100644 (file)
index 0000000..b96aaa2
--- /dev/null
@@ -0,0 +1 @@
+parent               = webserver
diff --git a/profile/mahara-trunk/remove-host b/profile/mahara-trunk/remove-host
new file mode 100644 (file)
index 0000000..975d464
--- /dev/null
@@ -0,0 +1 @@
+vserver pg81 suexec postgres dropdb ${VSNAME}
diff --git a/profile/mason/data/.bash_once b/profile/mason/data/.bash_once
new file mode 100644 (file)
index 0000000..e5feffa
--- /dev/null
@@ -0,0 +1,8 @@
+# ~/.bash_once: sourced from .bash_profile then deleted
+#
+# include .bash_once if it exists, then remove it
+if [ -d ~/work/head/ ]; then
+    echo "running automatic cvs checkout"
+    cd /home/donj/work/head/
+    cvs co -d HEAD clients/nzrb/tab
+fi
diff --git a/profile/mason/data/.bash_profile b/profile/mason/data/.bash_profile
new file mode 100644 (file)
index 0000000..f143c9f
--- /dev/null
@@ -0,0 +1,49 @@
+# ~/.bash_profile: executed by bash(1) for login shells.
+#
+# Catalyst Systems Administrator version - note that you
+# shouldn't customise this, since it will get overwritten
+# with a new version from your package.  If you want local
+# actions on this machine put them into ~/.bash_profile_local
+# which is sourced at the end, if it is present.
+#
+
+DEBVERSION="`cat /etc/debian_version`"
+UTFVERSION="3.1"
+versions() {
+  cat /etc/debian_version
+  echo ${UTFVERSION}
+}
+
+if [ "`versions | sort | head -n 1`" = "${UTFVERSION}" ] ; then
+  LC_CTYPE=en_NZ.UTF-8
+  export LC_CTYPE
+
+  LC_ALL=en_NZ.UTF-8
+  export LC_ALL
+fi
+
+# set variable identifying the chroot you work in
+if [ -f /etc/debian_chroot ]; then
+  debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# include .bashrc if it exists
+if [ -f ~/.bashrc ]; then
+    . ~/.bashrc
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d ~/bin ] ; then
+    PATH=~/bin:"${PATH}"
+fi
+
+# include .bash_profile_local if it exists
+if [ -f ~/.bash_profile_local ]; then
+    . ~/.bash_profile_local
+fi
+
+# include .bash_once if it exists, then remove it
+if [ -f ~/.bash_once ]; then
+    . ~/.bash_once
+    rm ~/.bash_once
+fi
diff --git a/profile/mason/data/.bashrc b/profile/mason/data/.bashrc
new file mode 100644 (file)
index 0000000..fba6a60
--- /dev/null
@@ -0,0 +1,86 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+export HISTCONTROL=ignoreboth
+export HISTSIZE=1000
+
+# git environment stuff
+export GIT_AUTHOR_NAME='Donovan Jones'
+export GIT_COMMITTER_NAME='Donovan Jones'
+export GIT_COMMITTER_EMAIL='donovan@catalyst.net.nz'
+export GIT_AUTHOR_EMAIL='donovan@catalyst.net.nz'
+
+# cvs environment stuff
+export CVSROOT=':ext:donj@cvs.catalyst.net.nz:/cvs'
+export CVS_RSH='/usr/bin/ssh'
+unset CVSREAD
+
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+    debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, unless we know we "want" color)
+#case "$TERM" in
+#xterm-color)
+#    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+#    ;;
+#*)
+#    PS1='${debian_chroot:+($debian_chroot)}\u@\h($SHLVL):\w\$ '
+#    ;;
+#esac
+
+# Comment in the above and uncomment this below for a color prompt
+PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h($SHLVL)\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
+    ;;
+*)
+    ;;
+esac
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+#if [ -f ~/.bash_aliases ]; then
+#    . ~/.bash_aliases
+#fi
+
+# enable color support of ls and also add handy aliases
+if [ "$TERM" != "dumb" ]; then
+    eval "`dircolors -b`"
+    alias ls='ls --color=auto'
+    #alias dir='ls --color=auto --format=vertical'
+    #alias vdir='ls --color=auto --format=long'
+fi
+
+# some more ls aliases
+#alias ll='ls -l'
+#alias la='ls -A'
+#alias l='ls -CF'
+
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+    . /etc/bash_completion
+fi
diff --git a/profile/mason/data/.vimrc b/profile/mason/data/.vimrc
new file mode 100644 (file)
index 0000000..e12c9af
--- /dev/null
@@ -0,0 +1,25 @@
+:syntax on
+:set nocompatible
+:set backup
+:set showcmd
+" tab stuff
+:set tabstop=4
+:set shiftwidth=4
+:set expandtab
+:set autoindent
+:set shiftround
+:set smarttab
+" search related
+:set hlsearch
+:set incsearch
+" clever autoindenting
+filetype plugin indent on
+" my maps
+:map ,1 :s/^/#/<CR>:nohl<CR><C-g>
+:map ,2 :set paste<Esc>i
+:map ,3 :nohl<CR><C-g>
+:map ,4 :%s/^    //<CR>
+:map ,5 :set filetype=mason<CR><C-g>
+" up and down in split screen
+:map ,k <c-w>k
+:map ,j <c-w>j
diff --git a/profile/mason/data/known_hosts b/profile/mason/data/known_hosts
new file mode 100644 (file)
index 0000000..6b2eb39
--- /dev/null
@@ -0,0 +1 @@
+cvs.catalyst.net.nz,202.78.240.34 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEApmC1UM46m0BF6FaOio/jkJRMxTLkW/JomVfu4hgK2HV1KPfWaHSyL8Yc0cgKA9pGv0oD/3q9ofhME4U7S3iezVSkFuawBYyoDEZssaXlsIB37UMstSR50pEiZU0+rW4Cc+fcFxhMcwWvBnAFy4VjNCjIqYah2dhTZQadLvJEmeE=
diff --git a/profile/mason/data/nzrb.ini b/profile/mason/data/nzrb.ini
new file mode 100644 (file)
index 0000000..e27644e
--- /dev/null
@@ -0,0 +1,152 @@
+[DB]
+DBName=tab
+Host=pg74
+Port=
+User=tab
+Password=
+DefaultLang=en
+
+[Monitoring]
+dailyCheckDir=/data/tab/dailycheck
+
+[microsites]
+basedir=/data/shared/webdav/microsites
+
+[DSHR]
+mappath=/data/shared/dshr
+logopath=/data/shared/webdav/content/dshr/logos
+presspath=/data/shared/webdav/content/dshr/press
+
+[info]
+newsimgdir=/data/shared/webdav/content/news
+
+[memcached]
+lockhost=localhost
+lockport=11211
+
+[ApacheSession]
+Store=Postgres
+Smepahores=32
+
+[Site]
+Domain=dev.tab.co.nz
+Debug=0
+Staging=1
+Production=0
+DR=0
+BaseDir=/var/www/tab
+
+[TabSite]
+StaticRoot=http://static.dev.tab.co.nz
+EbetRoot=https://ebetdev.tab.co.nz
+StaticDir=/var/www/tab/static
+StripHTML=f
+GZip=f
+
+[Email]
+SMTPHost=localhost
+Webmaster=webmaster@nzracingboard.co.nz
+Admin=admin@tab.wgtn.cat-it.co.nz
+XMLLoader=donovan@catalyst.net.nz
+XMLLoaderError=tab-system@catalyst.net.nz
+XMLLoaderNotify=donovan@catalyst.net.nz
+JEQISendEmail=1
+JEQIError=donovan@catalyst.net.nz
+JEQINotify=donovan@catalyst.net.nz
+TabSystem=tab-system@catalyst.net.nz
+TabDev=tab-system@catalyst.net.nz
+Client=donovan@catalyst.net.nz
+Administration=donovan@catalyst.net.nz
+
+[Admin]
+Domain=tab-admin.wgtn.cat-it.co.nz
+
+[Log]
+BaseDir=/var/log/tab
+
+[LogLevel]
+NZRB.Lock=INFO
+Default=INFO
+heartbeat=DEBUG
+jeqioddsnotification=DEBUG
+webController=DEBUG
+notificationProcessor=DEBUG
+xmlloader=DEBUG
+xmlloader_ng=DEBUG
+jeqinotificationlistener=DEBUG
+controllerTest=DEBUG
+collectZipFiles=DEBUG
+processZipFiles=DEBUG
+jeqi=DEBUG
+tracker=DEBUG
+sendEmailSpool=DEBUG
+sendSMSSpool=DEBUG
+mergeJockeyNonSkeletons=DEBUG
+mergeJockeySkelNonSkel=DEBUG
+mergeJockeySkeletons=DEBUG
+mergeRunnerNonSkeletons=DEBUG
+mergeRunnerSkelNonSkel=DEBUG
+mergeRunnerSkeletons=DEBUG
+clubroomimport=DEBUG
+
+[Lucene]
+Server=localhost
+Port=22222
+
+[JEQI]
+SystemId=Catalyst_Dev
+Server=203.96.82.132
+Port=3004
+PrimaryServer=203.96.82.132
+PrimaryPort=3004
+SecondaryServer=203.96.82.132
+SecondaryPort=3006
+TestServer=203.96.82.132
+TestPort=3002
+AbelardServer=abelard
+AbelardPort=3004
+JeqiAServer=172.16.10.102
+JeqiAPort=2000
+JeqiBServer=172.16.10.103
+JeqiBPort=2000
+AutoServerList=secondary,primary
+
+[JESI]
+Server=210.54.245.180
+Port=2001
+
+[FtpFiles]
+Protocol=Local
+Host=socrates.catalyst.net.nz
+User=tabftp
+Pass=redrumpony
+LocalDir=/data/shared/webdav/xml
+TmpDir=/data/xmlfeeds/tmp
+PendingDir=/data/xmlfeeds/pending
+ProcessedDir=/data/xmlfeeds/processed
+FailedDir=/data/xmlfeeds/failed
+ProcessedFile=/data/xmlfeeds/ProcessedXmlZipFiles
+
+[Clubroom]
+EmailSpoolDir=/data/tab/emailspool
+EmailCreateDir=/data/tab/emailspool/create
+EmailSentDir=/data/tab/emailspool/sent
+EmailFailedDir=/data/tab/emailspool/failed
+SmsSpoolDir=/data/tab/smsspool
+SmsCreateDir=/data/tab/smsspool/create
+SmsSentDir=/data/tab/smsspool/sent
+SmsFailedDir=/data/tab/smsspool/failed
+TextTemplate=/etc/tab/text.tt
+HtmlTemplate=/etc/tab/html.tt
+SmsTemplate=/etc/tab/sms.tt
+ReturnAddress=donovan@catalyst.net.nz
+
+[SMS]
+telecomuser=martyns
+telecompass=tabtest
+telecomshortcode=3822
+telecomhost=210.54.54.161
+vodafoneuser=voda
+vodafonepass=adov
+vodafoneshortcode=98425
+vodafonehost=202.78.240.38:13013
diff --git a/profile/mason/data/site.conf b/profile/mason/data/site.conf
new file mode 100644 (file)
index 0000000..2e75e1f
--- /dev/null
@@ -0,0 +1,25 @@
+NameVirtualHost *
+
+<VirtualHost *>
+    ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+
+    DocumentRoot /home/__PROFILEOPTION_username__/site
+
+    <Directory /home/__PROFILEOPTION_username__/site>
+        Order Allow,Deny
+        Allow from all
+
+        Options Indexes
+    </Directory>
+
+    <FilesMatch "\.html$">
+        SetHandler perl-script
+        PerlHandler HTML::Mason::ApacheHandler
+
+        PerlSetVar MasonCompRoot /home/__PROFILEOPTION_username__/site
+        PerlSetVar MasonDataDir  /home/__PROFILEOPTION_username__/.site.mason
+        PerlSetVar MasonErrorMode fatal
+    </FilesMatch>
+
+
+</VirtualHost>
diff --git a/profile/mason/files b/profile/mason/files
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/profile/mason/options b/profile/mason/options
new file mode 100644 (file)
index 0000000..27d7766
--- /dev/null
@@ -0,0 +1 @@
+username
diff --git a/profile/mason/packages b/profile/mason/packages
new file mode 100644 (file)
index 0000000..5f8a913
--- /dev/null
@@ -0,0 +1,14 @@
+apache-perl
+debconf
+libapache-dbi-perl
+libapache-mod-gzip
+libapache-request-perl
+libapache-session-perl
+libconfig-inifiles-perl
+libgetopt-mixed-perl
+libhtml-mason-perl
+libhtml-mason-perl-doc
+liblog-log4perl-perl
+libmd5-perl
+lsof
+postgresql-client
diff --git a/profile/mason/post-vserver b/profile/mason/post-vserver
new file mode 100644 (file)
index 0000000..4941f78
--- /dev/null
@@ -0,0 +1,6 @@
+mkdir -p /home/${PROFILEOPTION_username}/site
+mkdir -p /home/${PROFILEOPTION_username}/.site.mason
+chown -R ${PROFILEOPTION_username}:${PROFILEOPTION_username} /home/${PROFILEOPTION_username}
+chown www-data:www-data /home/${PROFILEOPTION_username}/.site.mason
+
+/usr/sbin/apache-perlctl restart
diff --git a/profile/mason/profile.conf b/profile/mason/profile.conf
new file mode 100644 (file)
index 0000000..fbf3811
--- /dev/null
@@ -0,0 +1 @@
+parent  = webserver
diff --git a/profile/mason/templates b/profile/mason/templates
new file mode 100644 (file)
index 0000000..fccf9fb
--- /dev/null
@@ -0,0 +1 @@
+site.conf             /etc/apache-perl/conf.d/
diff --git a/profile/php4/data/htdocs-martyn b/profile/php4/data/htdocs-martyn
new file mode 100644 (file)
index 0000000..16053f8
--- /dev/null
@@ -0,0 +1,6 @@
+<VirtualHost *>
+    ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+
+    DocumentRoot /home/martyn/htdocs
+
+</VirtualHost>
diff --git a/profile/php4/packages b/profile/php4/packages
new file mode 100644 (file)
index 0000000..d86276b
--- /dev/null
@@ -0,0 +1,2 @@
+apache2
+libapache2-mod-php4
diff --git a/profile/php4/post-vserver b/profile/php4/post-vserver
new file mode 100644 (file)
index 0000000..3734aac
--- /dev/null
@@ -0,0 +1,12 @@
+rm /etc/apache2/sites-enabled/000-default
+
+ln -s /etc/apache2/sites-available/htdocs-martyn /etc/apache2/sites-enabled/100-htdocs-martyn
+
+echo 'NameVirtualHost *' > /etc/apache2/sites-enabled/000-namevirtualhost
+
+mkdir /home/martyn/htdocs
+echo '<?php phpinfo(); ?>' > /home/martyn/htdocs/index.php
+
+chown -R martyn:martyn /home/martyn/htdocs
+
+apache2ctl graceful
diff --git a/profile/php4/profile.conf b/profile/php4/profile.conf
new file mode 100644 (file)
index 0000000..b96aaa2
--- /dev/null
@@ -0,0 +1 @@
+parent               = webserver
diff --git a/profile/php4/templates b/profile/php4/templates
new file mode 100644 (file)
index 0000000..3de3f26
--- /dev/null
@@ -0,0 +1 @@
+htdocs-martyn     /etc/apache2/sites-available/
diff --git a/profile/php5/data/htdocs-martyn b/profile/php5/data/htdocs-martyn
new file mode 100644 (file)
index 0000000..16053f8
--- /dev/null
@@ -0,0 +1,6 @@
+<VirtualHost *>
+    ServerName __VSNAME__.abelard.wgtn.cat-it.co.nz
+
+    DocumentRoot /home/martyn/htdocs
+
+</VirtualHost>
diff --git a/profile/php5/packages b/profile/php5/packages
new file mode 100644 (file)
index 0000000..81190d7
--- /dev/null
@@ -0,0 +1,2 @@
+apache2
+libapache2-mod-php5
diff --git a/profile/php5/post-vserver b/profile/php5/post-vserver
new file mode 100644 (file)
index 0000000..3734aac
--- /dev/null
@@ -0,0 +1,12 @@
+rm /etc/apache2/sites-enabled/000-default
+
+ln -s /etc/apache2/sites-available/htdocs-martyn /etc/apache2/sites-enabled/100-htdocs-martyn
+
+echo 'NameVirtualHost *' > /etc/apache2/sites-enabled/000-namevirtualhost
+
+mkdir /home/martyn/htdocs
+echo '<?php phpinfo(); ?>' > /home/martyn/htdocs/index.php
+
+chown -R martyn:martyn /home/martyn/htdocs
+
+apache2ctl graceful
diff --git a/profile/php5/profile.conf b/profile/php5/profile.conf
new file mode 100644 (file)
index 0000000..b96aaa2
--- /dev/null
@@ -0,0 +1 @@
+parent               = webserver
diff --git a/profile/php5/templates b/profile/php5/templates
new file mode 100644 (file)
index 0000000..3de3f26
--- /dev/null
@@ -0,0 +1 @@
+htdocs-martyn     /etc/apache2/sites-available/
diff --git a/profile/sarge/profile.conf b/profile/sarge/profile.conf
new file mode 100644 (file)
index 0000000..407b548
--- /dev/null
@@ -0,0 +1,2 @@
+parent               = base
+release              = sarge
diff --git a/profile/webserver/post-host b/profile/webserver/post-host
new file mode 100644 (file)
index 0000000..fd8003a
--- /dev/null
@@ -0,0 +1,4 @@
+# Add Apache Host Config
+[ -d /etc/apache2/vservers ] || mkdir -p /etc/apache2/vservers
+cat /vserver/.profile/webserver/vservers.template.conf | sed "s/__IPADDR__/${VSIPADDR}/" | sed "s/__NAME__/${VSNAME}/" > /etc/apache2/vservers/${VSNAME}.conf
+apache2ctl graceful
diff --git a/profile/webserver/profile.conf b/profile/webserver/profile.conf
new file mode 100644 (file)
index 0000000..05caf3f
--- /dev/null
@@ -0,0 +1 @@
+parent               = base
diff --git a/profile/webserver/remove-host b/profile/webserver/remove-host
new file mode 100644 (file)
index 0000000..de3310b
--- /dev/null
@@ -0,0 +1,3 @@
+# Remove Host Apache Conf
+rm -f /etc/apache2/vservers/${VSNAME}.conf
+apache2ctl graceful
diff --git a/profile/webserver/vservers.template.conf b/profile/webserver/vservers.template.conf
new file mode 100644 (file)
index 0000000..2e8c105
--- /dev/null
@@ -0,0 +1,29 @@
+<VirtualHost *:80>
+    ServerAdmin martyn@catalyst.net.nz
+    ServerName  __NAME__.abelard.wgtn.cat-it.co.nz
+    ServerAlias *.__NAME__.abelard.wgtn.cat-it.co.nz
+
+    LogLevel warn
+    ErrorLog /var/log/apache2/vserver.__NAME__.error.log
+    CustomLog /var/log/apache2/vserver.__NAME__.access.log combined
+
+    ServerSignature On
+
+    <Proxy>
+        Order allow,deny
+        Allow from all
+    </Proxy>
+
+    ProxyPreserveHost On
+    ProxyPass / http://__IPADDR__/
+    AllowEncodedSlashes On
+</VirtualHost>
+<VirtualHost *:80>
+    ServerName __NAME__.abelard
+    ServerAlias *.__NAME__.abelard
+
+    RewriteEngine On
+
+    RewriteCond   %{HTTP_HOST} ^(.*)__NAME__.abelard$
+    RewriteRule   ^(.*)$       http://%1__NAME__.abelard.wgtn.cat-it.co.nz$1 [L,R=301]
+</VirtualHost>
diff --git a/profile/woody/profile.conf b/profile/woody/profile.conf
new file mode 100644 (file)
index 0000000..18e221b
--- /dev/null
@@ -0,0 +1,3 @@
+parent               = base
+release              = woody
+mirror               = http://debian-archive.catalyst.net.nz/debian